@knowledge-stack/ksapi 3.6.2 → 3.8.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 (74) hide show
  1. package/.openapi-generator/FILES +0 -4
  2. package/README.md +2 -4
  3. package/dist/apis/DocumentsApi.d.ts +4 -7
  4. package/dist/apis/DocumentsApi.js +2 -5
  5. package/dist/apis/SystemJobsApi.d.ts +4 -4
  6. package/dist/apis/SystemJobsApi.js +2 -2
  7. package/dist/esm/apis/DocumentsApi.d.ts +4 -7
  8. package/dist/esm/apis/DocumentsApi.js +2 -5
  9. package/dist/esm/apis/SystemJobsApi.d.ts +4 -4
  10. package/dist/esm/apis/SystemJobsApi.js +2 -2
  11. package/dist/esm/models/AskRequest.d.ts +7 -0
  12. package/dist/esm/models/AskRequest.js +3 -0
  13. package/dist/esm/models/DocumentVersionMetadata.d.ts +0 -7
  14. package/dist/esm/models/DocumentVersionMetadata.js +0 -3
  15. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +0 -7
  16. package/dist/esm/models/DocumentVersionMetadataUpdate.js +0 -3
  17. package/dist/esm/models/IngestDocumentResponse.d.ts +0 -18
  18. package/dist/esm/models/IngestDocumentResponse.js +0 -6
  19. package/dist/esm/models/PipelineState.d.ts +8 -1
  20. package/dist/esm/models/PipelineState.js +3 -0
  21. package/dist/esm/models/UploadFormat.d.ts +6 -0
  22. package/dist/esm/models/UploadFormat.js +4 -0
  23. package/dist/esm/models/UserMessageRequest.d.ts +7 -0
  24. package/dist/esm/models/UserMessageRequest.js +3 -0
  25. package/dist/esm/models/index.d.ts +0 -2
  26. package/dist/esm/models/index.js +0 -2
  27. package/dist/models/AskRequest.d.ts +7 -0
  28. package/dist/models/AskRequest.js +3 -0
  29. package/dist/models/DocumentVersionMetadata.d.ts +0 -7
  30. package/dist/models/DocumentVersionMetadata.js +0 -3
  31. package/dist/models/DocumentVersionMetadataUpdate.d.ts +0 -7
  32. package/dist/models/DocumentVersionMetadataUpdate.js +0 -3
  33. package/dist/models/IngestDocumentResponse.d.ts +0 -18
  34. package/dist/models/IngestDocumentResponse.js +0 -6
  35. package/dist/models/PipelineState.d.ts +8 -1
  36. package/dist/models/PipelineState.js +3 -0
  37. package/dist/models/UploadFormat.d.ts +6 -0
  38. package/dist/models/UploadFormat.js +4 -0
  39. package/dist/models/UserMessageRequest.d.ts +7 -0
  40. package/dist/models/UserMessageRequest.js +3 -0
  41. package/dist/models/index.d.ts +0 -2
  42. package/dist/models/index.js +0 -2
  43. package/docs/AskRequest.md +2 -0
  44. package/docs/DocumentVersionMetadata.md +0 -2
  45. package/docs/DocumentVersionMetadataUpdate.md +0 -2
  46. package/docs/DocumentsApi.md +2 -5
  47. package/docs/IngestDocumentResponse.md +0 -6
  48. package/docs/PipelineState.md +2 -0
  49. package/docs/SystemJobsApi.md +1 -1
  50. package/docs/UploadFormat.md +2 -0
  51. package/docs/UserMessageRequest.md +2 -0
  52. package/package.json +1 -1
  53. package/src/apis/DocumentsApi.ts +4 -11
  54. package/src/apis/SystemJobsApi.ts +4 -4
  55. package/src/models/AskRequest.ts +18 -0
  56. package/src/models/DocumentVersionMetadata.ts +0 -15
  57. package/src/models/DocumentVersionMetadataUpdate.ts +0 -15
  58. package/src/models/IngestDocumentResponse.ts +0 -24
  59. package/src/models/PipelineState.ts +16 -1
  60. package/src/models/UploadFormat.ts +9 -0
  61. package/src/models/UserMessageRequest.ts +18 -0
  62. package/src/models/index.ts +0 -2
  63. package/dist/esm/models/EmailMetadata.d.ts +0 -119
  64. package/dist/esm/models/EmailMetadata.js +0 -65
  65. package/dist/esm/models/EmailParty.d.ts +0 -53
  66. package/dist/esm/models/EmailParty.js +0 -46
  67. package/dist/models/EmailMetadata.d.ts +0 -119
  68. package/dist/models/EmailMetadata.js +0 -73
  69. package/dist/models/EmailParty.d.ts +0 -53
  70. package/dist/models/EmailParty.js +0 -54
  71. package/docs/EmailMetadata.md +0 -57
  72. package/docs/EmailParty.md +0 -37
  73. package/src/models/EmailMetadata.ts +0 -183
  74. package/src/models/EmailParty.ts +0 -91
@@ -122,7 +122,6 @@ export interface IngestDocumentRequest {
122
122
  name?: string | null;
123
123
  tagIds?: Array<string>;
124
124
  idempotencyKey?: string | null;
125
- emailNestingDepth?: number;
126
125
  ingestionMode?: IngestionMode;
127
126
  chunkType?: ChunkType;
128
127
  secondaryTaxonomy?: ImageTaxonomy;
@@ -386,7 +385,6 @@ export interface DocumentsApiInterface {
386
385
  * @param {string} [name] Document name (defaults to filename)
387
386
  * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
388
387
  * @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.
389
- * @param {number} [emailNestingDepth] Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads.
390
388
  * @param {IngestionMode} [ingestionMode]
391
389
  * @param {ChunkType} [chunkType]
392
390
  * @param {ImageTaxonomy} [secondaryTaxonomy]
@@ -406,7 +404,6 @@ export interface DocumentsApiInterface {
406
404
  * @param {string} [name] Document name (defaults to filename)
407
405
  * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
408
406
  * @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.
409
- * @param {number} [emailNestingDepth] Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads.
410
407
  * @param {IngestionMode} [ingestionMode]
411
408
  * @param {ChunkType} [chunkType]
412
409
  * @param {ImageTaxonomy} [secondaryTaxonomy]
@@ -441,7 +438,7 @@ export interface DocumentsApiInterface {
441
438
  ingestDocumentVersionRequestOpts(requestParameters: IngestDocumentVersionRequest): Promise<runtime.RequestOpts>;
442
439
 
443
440
  /**
444
- * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
441
+ * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). The file must be the document\'s type (a PDF document takes only PDF versions; ``.md`` and ``.txt`` are both PLAINTEXT); any other type is a 400. Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
445
442
  * @summary Ingest Document Version Handler
446
443
  * @param {string} documentId Document ID
447
444
  * @param {Blob} file
@@ -458,7 +455,7 @@ export interface DocumentsApiInterface {
458
455
  ingestDocumentVersionRaw(requestParameters: IngestDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>>;
459
456
 
460
457
  /**
461
- * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
458
+ * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). The file must be the document\'s type (a PDF document takes only PDF versions; ``.md`` and ``.txt`` are both PLAINTEXT); any other type is a 400. Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
462
459
  * Ingest Document Version Handler
463
460
  */
464
461
  ingestDocumentVersion(requestParameters: IngestDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
@@ -1126,10 +1123,6 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
1126
1123
  formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
1127
1124
  }
1128
1125
 
1129
- if (requestParameters['emailNestingDepth'] != null) {
1130
- formParams.append('email_nesting_depth', requestParameters['emailNestingDepth'] as any);
1131
- }
1132
-
1133
1126
  if (requestParameters['ingestionMode'] != null) {
1134
1127
  formParams.append('ingestion_mode', requestParameters['ingestionMode'] as any);
1135
1128
  }
@@ -1274,7 +1267,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
1274
1267
  }
1275
1268
 
1276
1269
  /**
1277
- * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
1270
+ * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). The file must be the document\'s type (a PDF document takes only PDF versions; ``.md`` and ``.txt`` are both PLAINTEXT); any other type is a 400. Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
1278
1271
  * Ingest Document Version Handler
1279
1272
  */
1280
1273
  async ingestDocumentVersionRaw(requestParameters: IngestDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IngestDocumentResponse>> {
@@ -1285,7 +1278,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
1285
1278
  }
1286
1279
 
1287
1280
  /**
1288
- * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
1281
+ * Upload a new file for an existing document, creating a new version and triggering ingestion. Requires an active document checkout held by the caller. Acquire one via ``POST /v1/documents/{id}/checkout`` first and release it after; otherwise this returns 409 Conflict (\"A document checkout is required to edit this document.\"). The file must be the document\'s type (a PDF document takes only PDF versions; ``.md`` and ``.txt`` are both PLAINTEXT); any other type is a 400. Creates a new document version (incrementing the highest version number), uploads the file to S3, and starts the ingestion workflow. Upon successful ingestion, the new version is automatically activated (set as the document\'s active_version) and the old version\'s Qdrant points are deactivated. Returns 201 immediately with the Temporal ``workflow_id``. Ingestion runs in the background — poll ``GET /v1/system-jobs/document_versions/{workflow_id}`` (also given in the ``Location`` header) until ``status`` is terminal.
1289
1282
  * Ingest Document Version Handler
1290
1283
  */
1291
1284
  async ingestDocumentVersion(requestParameters: IngestDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse> {
@@ -180,7 +180,7 @@ export interface SystemJobsApiInterface {
180
180
  getZipIngestionStatusRequestOpts(requestParameters: GetZipIngestionStatusRequest): Promise<runtime.RequestOpts>;
181
181
 
182
182
  /**
183
- * Get a fan-out\'s live status + per-member outcomes. Serves both container fan-outs: a ZIP archive\'s members and an email\'s attachments. Both expose the same ``results`` query, so one endpoint covers them rather than duplicating the tenant check and hydration. 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.
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
184
  * @summary Get Zip Ingestion Status Handler
185
185
  * @param {string} workflowId
186
186
  * @param {*} [options] Override http request option.
@@ -190,7 +190,7 @@ export interface SystemJobsApiInterface {
190
190
  getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>>;
191
191
 
192
192
  /**
193
- * Get a fan-out\'s live status + per-member outcomes. Serves both container fan-outs: a ZIP archive\'s members and an email\'s attachments. Both expose the same ``results`` query, so one endpoint covers them rather than duplicating the tenant check and hydration. 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.
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
194
  * Get Zip Ingestion Status Handler
195
195
  */
196
196
  getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse>;
@@ -484,7 +484,7 @@ export class SystemJobsApi extends runtime.BaseAPI implements SystemJobsApiInter
484
484
  }
485
485
 
486
486
  /**
487
- * Get a fan-out\'s live status + per-member outcomes. Serves both container fan-outs: a ZIP archive\'s members and an email\'s attachments. Both expose the same ``results`` query, so one endpoint covers them rather than duplicating the tenant check and hydration. 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.
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
488
  * Get Zip Ingestion Status Handler
489
489
  */
490
490
  async getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>> {
@@ -495,7 +495,7 @@ export class SystemJobsApi extends runtime.BaseAPI implements SystemJobsApiInter
495
495
  }
496
496
 
497
497
  /**
498
- * Get a fan-out\'s live status + per-member outcomes. Serves both container fan-outs: a ZIP archive\'s members and an email\'s attachments. Both expose the same ``results`` query, so one endpoint covers them rather than duplicating the tenant check and hydration. 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.
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
499
  * Get Zip Ingestion Status Handler
500
500
  */
501
501
  async getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse> {
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { SupportedLanguage } from './SupportedLanguage';
17
+ import {
18
+ SupportedLanguageFromJSON,
19
+ SupportedLanguageFromJSONTyped,
20
+ SupportedLanguageToJSON,
21
+ SupportedLanguageToJSONTyped,
22
+ } from './SupportedLanguage';
23
+
16
24
  /**
17
25
  * Request body for POST /v1/agent/ask.
18
26
  * @export
@@ -25,7 +33,15 @@ export interface AskRequest {
25
33
  * @memberof AskRequest
26
34
  */
27
35
  prompt: string;
36
+ /**
37
+ *
38
+ * @type {SupportedLanguage}
39
+ * @memberof AskRequest
40
+ */
41
+ outputLanguage?: SupportedLanguage;
28
42
  }
43
+
44
+
29
45
  export const AskRequestPropertyValidationAttributesMap: {
30
46
  [property: string]: {
31
47
  maxLength?: number,
@@ -63,6 +79,7 @@ export function AskRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean)
63
79
  return {
64
80
 
65
81
  'prompt': json['prompt'],
82
+ 'outputLanguage': json['output_language'] == null ? undefined : SupportedLanguageFromJSON(json['output_language']),
66
83
  };
67
84
  }
68
85
 
@@ -78,6 +95,7 @@ export function AskRequestToJSONTyped(value?: AskRequest | null, ignoreDiscrimin
78
95
  return {
79
96
 
80
97
  'prompt': value['prompt'],
98
+ 'output_language': SupportedLanguageToJSON(value['outputLanguage']),
81
99
  };
82
100
  }
83
101
 
@@ -34,13 +34,6 @@ import {
34
34
  InformationStatisticsToJSON,
35
35
  InformationStatisticsToJSONTyped,
36
36
  } from './InformationStatistics';
37
- import type { EmailMetadata } from './EmailMetadata';
38
- import {
39
- EmailMetadataFromJSON,
40
- EmailMetadataFromJSONTyped,
41
- EmailMetadataToJSON,
42
- EmailMetadataToJSONTyped,
43
- } from './EmailMetadata';
44
37
 
45
38
  /**
46
39
  * Schema for document_version.system_metadata JSONB field.
@@ -141,12 +134,6 @@ export interface DocumentVersionMetadata {
141
134
  * @memberof DocumentVersionMetadata
142
135
  */
143
136
  segmentCount?: number | null;
144
- /**
145
- * Structured email headers; null for non-email documents
146
- * @type {EmailMetadata}
147
- * @memberof DocumentVersionMetadata
148
- */
149
- email?: EmailMetadata | null;
150
137
  /**
151
138
  * Total formula cells in the workbook (XLSX only)
152
139
  * @type {number}
@@ -269,7 +256,6 @@ export function DocumentVersionMetadataFromJSONTyped(json: any, ignoreDiscrimina
269
256
  'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
270
257
  'language': json['language'] == null ? undefined : json['language'],
271
258
  'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
272
- 'email': json['email'] == null ? undefined : EmailMetadataFromJSON(json['email']),
273
259
  'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
274
260
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
275
261
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
@@ -310,7 +296,6 @@ export function DocumentVersionMetadataToJSONTyped(value?: DocumentVersionMetada
310
296
  'duration_ms': value['durationMs'],
311
297
  'language': value['language'],
312
298
  'segment_count': value['segmentCount'],
313
- 'email': EmailMetadataToJSON(value['email']),
314
299
  'total_formulas': value['totalFormulas'],
315
300
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
316
301
  'xlsx_named_ranges': value['xlsxNamedRanges'],
@@ -34,13 +34,6 @@ import {
34
34
  InformationStatisticsToJSON,
35
35
  InformationStatisticsToJSONTyped,
36
36
  } from './InformationStatistics';
37
- import type { EmailMetadata } from './EmailMetadata';
38
- import {
39
- EmailMetadataFromJSON,
40
- EmailMetadataFromJSONTyped,
41
- EmailMetadataToJSON,
42
- EmailMetadataToJSONTyped,
43
- } from './EmailMetadata';
44
37
 
45
38
  /**
46
39
  * Partial update schema for document version metadata.
@@ -153,12 +146,6 @@ export interface DocumentVersionMetadataUpdate {
153
146
  * @memberof DocumentVersionMetadataUpdate
154
147
  */
155
148
  segmentCount?: number | null;
156
- /**
157
- *
158
- * @type {EmailMetadata}
159
- * @memberof DocumentVersionMetadataUpdate
160
- */
161
- email?: EmailMetadata | null;
162
149
  /**
163
150
  *
164
151
  * @type {number}
@@ -278,7 +265,6 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json: any, ignoreDisc
278
265
  'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
279
266
  'language': json['language'] == null ? undefined : json['language'],
280
267
  'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
281
- 'email': json['email'] == null ? undefined : EmailMetadataFromJSON(json['email']),
282
268
  'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
283
269
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
284
270
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
@@ -321,7 +307,6 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value?: DocumentVersion
321
307
  'duration_ms': value['durationMs'],
322
308
  'language': value['language'],
323
309
  'segment_count': value['segmentCount'],
324
- 'email': EmailMetadataToJSON(value['email']),
325
310
  'total_formulas': value['totalFormulas'],
326
311
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
327
312
  'xlsx_named_ranges': value['xlsxNamedRanges'],
@@ -37,24 +37,6 @@ export interface IngestDocumentResponse {
37
37
  * @memberof IngestDocumentResponse
38
38
  */
39
39
  documentVersionId: string;
40
- /**
41
- * Folder created to hold this upload and its members. Set for email uploads, which always nest inside their own folder; null for every other type, which ingest directly into path_part_id.
42
- * @type {string}
43
- * @memberof IngestDocumentResponse
44
- */
45
- folderId?: string | null;
46
- /**
47
- * Members found on an email upload, each becoming its own document beside the email: the attachments of a single message, or the messages of an .mbox archive (whose own attachments are then expanded one level deeper). Always 0 for non-email uploads. Null for a .pst, whose members are enumerated only by the worker fan-out — poll attachment_workflow_id for per-member outcomes.
48
- * @type {number}
49
- * @memberof IngestDocumentResponse
50
- */
51
- attachmentCount?: number | null;
52
- /**
53
- * Fan-out workflow ingesting the members. Poll GET /v1/system-jobs/zip-ingestions/{id} for per-member outcomes. Null when the upload had no ingestible members.
54
- * @type {string}
55
- * @memberof IngestDocumentResponse
56
- */
57
- attachmentWorkflowId?: string | null;
58
40
  }
59
41
  export const IngestDocumentResponsePropertyValidationAttributesMap: {
60
42
  [property: string]: {
@@ -97,9 +79,6 @@ export function IngestDocumentResponseFromJSONTyped(json: any, ignoreDiscriminat
97
79
  'workflowId': json['workflow_id'],
98
80
  'documentId': json['document_id'],
99
81
  'documentVersionId': json['document_version_id'],
100
- 'folderId': json['folder_id'] == null ? undefined : json['folder_id'],
101
- 'attachmentCount': json['attachment_count'] == null ? undefined : json['attachment_count'],
102
- 'attachmentWorkflowId': json['attachment_workflow_id'] == null ? undefined : json['attachment_workflow_id'],
103
82
  };
104
83
  }
105
84
 
@@ -117,9 +96,6 @@ export function IngestDocumentResponseToJSONTyped(value?: IngestDocumentResponse
117
96
  'workflow_id': value['workflowId'],
118
97
  'document_id': value['documentId'],
119
98
  'document_version_id': value['documentVersionId'],
120
- 'folder_id': value['folderId'],
121
- 'attachment_count': value['attachmentCount'],
122
- 'attachment_workflow_id': value['attachmentWorkflowId'],
123
99
  };
124
100
  }
125
101
 
@@ -20,6 +20,13 @@ import {
20
20
  PipelineStatusToJSON,
21
21
  PipelineStatusToJSONTyped,
22
22
  } from './PipelineStatus';
23
+ import type { ImageTaxonomy } from './ImageTaxonomy';
24
+ import {
25
+ ImageTaxonomyFromJSON,
26
+ ImageTaxonomyFromJSONTyped,
27
+ ImageTaxonomyToJSON,
28
+ ImageTaxonomyToJSONTyped,
29
+ } from './ImageTaxonomy';
23
30
  import type { IngestionMode } from './IngestionMode';
24
31
  import {
25
32
  IngestionModeFromJSON,
@@ -60,7 +67,7 @@ export interface PipelineState {
60
67
  */
61
68
  lastStateUpdateTimestamp?: Date | null;
62
69
  /**
63
- * Name of the last activity that executed (e.g., 'document_preparation')
70
+ * Name of the last activity that executed (e.g., 'pdf_preparation_activity')
64
71
  * @type {string}
65
72
  * @memberof PipelineState
66
73
  */
@@ -101,6 +108,12 @@ export interface PipelineState {
101
108
  * @memberof PipelineState
102
109
  */
103
110
  chunkType?: ChunkType;
111
+ /**
112
+ *
113
+ * @type {ImageTaxonomy}
114
+ * @memberof PipelineState
115
+ */
116
+ secondaryTaxonomy?: ImageTaxonomy;
104
117
  }
105
118
 
106
119
 
@@ -150,6 +163,7 @@ export function PipelineStateFromJSONTyped(json: any, ignoreDiscriminator: boole
150
163
  'pageDpi': json['page_dpi'] == null ? undefined : json['page_dpi'],
151
164
  'ingestionMode': json['ingestion_mode'] == null ? undefined : IngestionModeFromJSON(json['ingestion_mode']),
152
165
  'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
166
+ 'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : ImageTaxonomyFromJSON(json['secondary_taxonomy']),
153
167
  };
154
168
  }
155
169
 
@@ -174,6 +188,7 @@ export function PipelineStateToJSONTyped(value?: PipelineState | null, ignoreDis
174
188
  'page_dpi': value['pageDpi'],
175
189
  'ingestion_mode': IngestionModeToJSON(value['ingestionMode']),
176
190
  'chunk_type': ChunkTypeToJSON(value['chunkType']),
191
+ 'secondary_taxonomy': ImageTaxonomyToJSON(value['secondaryTaxonomy']),
177
192
  };
178
193
  }
179
194
 
@@ -31,6 +31,12 @@ export interface UploadFormat {
31
31
  * @memberof UploadFormat
32
32
  */
33
33
  contentType: string;
34
+ /**
35
+ * Largest file of this format the buffered uploads accept (new document, new version, ZIP member, workflow-run file). A new audio/video document uses the resumable upload, capped at upload.max_media_bytes
36
+ * @type {number}
37
+ * @memberof UploadFormat
38
+ */
39
+ maxBytes: number;
34
40
  }
35
41
  export const UploadFormatPropertyValidationAttributesMap: {
36
42
  [property: string]: {
@@ -56,6 +62,7 @@ export const UploadFormatPropertyValidationAttributesMap: {
56
62
  export function instanceOfUploadFormat(value: object): value is UploadFormat {
57
63
  if (!('extension' in value) || value['extension'] === undefined) return false;
58
64
  if (!('contentType' in value) || value['contentType'] === undefined) return false;
65
+ if (!('maxBytes' in value) || value['maxBytes'] === undefined) return false;
59
66
  return true;
60
67
  }
61
68
 
@@ -71,6 +78,7 @@ export function UploadFormatFromJSONTyped(json: any, ignoreDiscriminator: boolea
71
78
 
72
79
  'extension': json['extension'],
73
80
  'contentType': json['content_type'],
81
+ 'maxBytes': json['max_bytes'],
74
82
  };
75
83
  }
76
84
 
@@ -87,6 +95,7 @@ export function UploadFormatToJSONTyped(value?: UploadFormat | null, ignoreDiscr
87
95
 
88
96
  'extension': value['extension'],
89
97
  'content_type': value['contentType'],
98
+ 'max_bytes': value['maxBytes'],
90
99
  };
91
100
  }
92
101
 
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { SupportedLanguage } from './SupportedLanguage';
17
+ import {
18
+ SupportedLanguageFromJSON,
19
+ SupportedLanguageFromJSONTyped,
20
+ SupportedLanguageToJSON,
21
+ SupportedLanguageToJSONTyped,
22
+ } from './SupportedLanguage';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -31,7 +39,15 @@ export interface UserMessageRequest {
31
39
  * @memberof UserMessageRequest
32
40
  */
33
41
  fastMode?: boolean | null;
42
+ /**
43
+ *
44
+ * @type {SupportedLanguage}
45
+ * @memberof UserMessageRequest
46
+ */
47
+ outputLanguage?: SupportedLanguage;
34
48
  }
49
+
50
+
35
51
  export const UserMessageRequestPropertyValidationAttributesMap: {
36
52
  [property: string]: {
37
53
  maxLength?: number,
@@ -69,6 +85,7 @@ export function UserMessageRequestFromJSONTyped(json: any, ignoreDiscriminator:
69
85
 
70
86
  'inputText': json['input_text'] == null ? undefined : json['input_text'],
71
87
  'fastMode': json['fast_mode'] == null ? undefined : json['fast_mode'],
88
+ 'outputLanguage': json['output_language'] == null ? undefined : SupportedLanguageFromJSON(json['output_language']),
72
89
  };
73
90
  }
74
91
 
@@ -85,6 +102,7 @@ export function UserMessageRequestToJSONTyped(value?: UserMessageRequest | null,
85
102
 
86
103
  'input_text': value['inputText'],
87
104
  'fast_mode': value['fastMode'],
105
+ 'output_language': SupportedLanguageToJSON(value['outputLanguage']),
88
106
  };
89
107
  }
90
108
 
@@ -134,8 +134,6 @@ export * from './DocxParagraphAnchorInput';
134
134
  export * from './DocxParagraphAnchorOutput';
135
135
  export * from './DownloadArtifact';
136
136
  export * from './EditMemoryChunkRequest';
137
- export * from './EmailMetadata';
138
- export * from './EmailParty';
139
137
  export * from './EmailSentResponse';
140
138
  export * from './EmailVerificationRequest';
141
139
  export * from './EnrichedCitation';
@@ -1,119 +0,0 @@
1
- /**
2
- * Knowledge Stack API
3
- * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
4
- *
5
- * The version of the OpenAPI document: 0.1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { EmailParty } from './EmailParty';
13
- /**
14
- * Structured headers of an ingested email (EMAIL document type only).
15
- *
16
- * Populated by ``document_preparation_activity`` from the same parse that
17
- * renders the message body, so the stored metadata and the rendered document
18
- * cannot disagree. Null on a multi-message archive: its messages are ingested
19
- * as their own documents, and each carries its own block.
20
- * @export
21
- * @interface EmailMetadata
22
- */
23
- export interface EmailMetadata {
24
- /**
25
- * Message subject
26
- * @type {string}
27
- * @memberof EmailMetadata
28
- */
29
- subject?: string;
30
- /**
31
- * Sender; null if unparseable
32
- * @type {EmailParty}
33
- * @memberof EmailMetadata
34
- */
35
- sender?: EmailParty | null;
36
- /**
37
- * To recipients
38
- * @type {Array<EmailParty>}
39
- * @memberof EmailMetadata
40
- */
41
- to?: Array<EmailParty>;
42
- /**
43
- * Cc recipients
44
- * @type {Array<EmailParty>}
45
- * @memberof EmailMetadata
46
- */
47
- cc?: Array<EmailParty>;
48
- /**
49
- * Bcc recipients. Present only when the source file carries them — a sending MTA strips Bcc, so it survives in the sender's own copy (a .msg exported from Sent Items) but never in a received .eml.
50
- * @type {Array<EmailParty>}
51
- * @memberof EmailMetadata
52
- */
53
- bcc?: Array<EmailParty>;
54
- /**
55
- * Date header, as written
56
- * @type {string}
57
- * @memberof EmailMetadata
58
- */
59
- sentAt?: string;
60
- /**
61
- * RFC 5322 Message-ID
62
- * @type {string}
63
- * @memberof EmailMetadata
64
- */
65
- messageId?: string;
66
- /**
67
- * Message-ID being replied to
68
- * @type {string}
69
- * @memberof EmailMetadata
70
- */
71
- inReplyTo?: string;
72
- /**
73
- * Reply chain, oldest first
74
- * @type {Array<string>}
75
- * @memberof EmailMetadata
76
- */
77
- references?: Array<string>;
78
- /**
79
- * Outlook PidTagConversationTopic (.msg only)
80
- * @type {string}
81
- * @memberof EmailMetadata
82
- */
83
- conversationTopic?: string;
84
- /**
85
- * Message-ID that started the thread — the first References entry, or this message's own id. Group by this to reconstruct a thread.
86
- * @type {string}
87
- * @memberof EmailMetadata
88
- */
89
- threadRootId?: string;
90
- /**
91
- * The verbatim header block, so a header this schema does not model stays recoverable without re-reading the source file.
92
- * @type {string}
93
- * @memberof EmailMetadata
94
- */
95
- rawHeaders?: string;
96
- }
97
- export declare const EmailMetadataPropertyValidationAttributesMap: {
98
- [property: string]: {
99
- maxLength?: number;
100
- minLength?: number;
101
- pattern?: string;
102
- maximum?: number;
103
- exclusiveMaximum?: boolean;
104
- minimum?: number;
105
- exclusiveMinimum?: boolean;
106
- multipleOf?: number;
107
- maxItems?: number;
108
- minItems?: number;
109
- uniqueItems?: boolean;
110
- };
111
- };
112
- /**
113
- * Check if a given object implements the EmailMetadata interface.
114
- */
115
- export declare function instanceOfEmailMetadata(value: object): value is EmailMetadata;
116
- export declare function EmailMetadataFromJSON(json: any): EmailMetadata;
117
- export declare function EmailMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailMetadata;
118
- export declare function EmailMetadataToJSON(json: any): EmailMetadata;
119
- export declare function EmailMetadataToJSONTyped(value?: EmailMetadata | null, ignoreDiscriminator?: boolean): any;
@@ -1,65 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Knowledge Stack API
5
- * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
- *
7
- * The version of the OpenAPI document: 0.1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { EmailPartyFromJSON, EmailPartyToJSON, } from './EmailParty';
15
- export const EmailMetadataPropertyValidationAttributesMap = {};
16
- /**
17
- * Check if a given object implements the EmailMetadata interface.
18
- */
19
- export function instanceOfEmailMetadata(value) {
20
- return true;
21
- }
22
- export function EmailMetadataFromJSON(json) {
23
- return EmailMetadataFromJSONTyped(json, false);
24
- }
25
- export function EmailMetadataFromJSONTyped(json, ignoreDiscriminator) {
26
- if (json == null) {
27
- return json;
28
- }
29
- return {
30
- 'subject': json['subject'] == null ? undefined : json['subject'],
31
- 'sender': json['sender'] == null ? undefined : EmailPartyFromJSON(json['sender']),
32
- 'to': json['to'] == null ? undefined : (json['to'].map(EmailPartyFromJSON)),
33
- 'cc': json['cc'] == null ? undefined : (json['cc'].map(EmailPartyFromJSON)),
34
- 'bcc': json['bcc'] == null ? undefined : (json['bcc'].map(EmailPartyFromJSON)),
35
- 'sentAt': json['sent_at'] == null ? undefined : json['sent_at'],
36
- 'messageId': json['message_id'] == null ? undefined : json['message_id'],
37
- 'inReplyTo': json['in_reply_to'] == null ? undefined : json['in_reply_to'],
38
- 'references': json['references'] == null ? undefined : json['references'],
39
- 'conversationTopic': json['conversation_topic'] == null ? undefined : json['conversation_topic'],
40
- 'threadRootId': json['thread_root_id'] == null ? undefined : json['thread_root_id'],
41
- 'rawHeaders': json['raw_headers'] == null ? undefined : json['raw_headers'],
42
- };
43
- }
44
- export function EmailMetadataToJSON(json) {
45
- return EmailMetadataToJSONTyped(json, false);
46
- }
47
- export function EmailMetadataToJSONTyped(value, ignoreDiscriminator = false) {
48
- if (value == null) {
49
- return value;
50
- }
51
- return {
52
- 'subject': value['subject'],
53
- 'sender': EmailPartyToJSON(value['sender']),
54
- 'to': value['to'] == null ? undefined : (value['to'].map(EmailPartyToJSON)),
55
- 'cc': value['cc'] == null ? undefined : (value['cc'].map(EmailPartyToJSON)),
56
- 'bcc': value['bcc'] == null ? undefined : (value['bcc'].map(EmailPartyToJSON)),
57
- 'sent_at': value['sentAt'],
58
- 'message_id': value['messageId'],
59
- 'in_reply_to': value['inReplyTo'],
60
- 'references': value['references'],
61
- 'conversation_topic': value['conversationTopic'],
62
- 'thread_root_id': value['threadRootId'],
63
- 'raw_headers': value['rawHeaders'],
64
- };
65
- }