@knowledge-stack/ksapi 3.7.0 → 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 (62) 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/DocumentVersionMetadata.d.ts +0 -7
  12. package/dist/esm/models/DocumentVersionMetadata.js +0 -3
  13. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +0 -7
  14. package/dist/esm/models/DocumentVersionMetadataUpdate.js +0 -3
  15. package/dist/esm/models/IngestDocumentResponse.d.ts +0 -18
  16. package/dist/esm/models/IngestDocumentResponse.js +0 -6
  17. package/dist/esm/models/PipelineState.d.ts +8 -1
  18. package/dist/esm/models/PipelineState.js +3 -0
  19. package/dist/esm/models/UploadFormat.d.ts +6 -0
  20. package/dist/esm/models/UploadFormat.js +4 -0
  21. package/dist/esm/models/index.d.ts +0 -2
  22. package/dist/esm/models/index.js +0 -2
  23. package/dist/models/DocumentVersionMetadata.d.ts +0 -7
  24. package/dist/models/DocumentVersionMetadata.js +0 -3
  25. package/dist/models/DocumentVersionMetadataUpdate.d.ts +0 -7
  26. package/dist/models/DocumentVersionMetadataUpdate.js +0 -3
  27. package/dist/models/IngestDocumentResponse.d.ts +0 -18
  28. package/dist/models/IngestDocumentResponse.js +0 -6
  29. package/dist/models/PipelineState.d.ts +8 -1
  30. package/dist/models/PipelineState.js +3 -0
  31. package/dist/models/UploadFormat.d.ts +6 -0
  32. package/dist/models/UploadFormat.js +4 -0
  33. package/dist/models/index.d.ts +0 -2
  34. package/dist/models/index.js +0 -2
  35. package/docs/DocumentVersionMetadata.md +0 -2
  36. package/docs/DocumentVersionMetadataUpdate.md +0 -2
  37. package/docs/DocumentsApi.md +2 -5
  38. package/docs/IngestDocumentResponse.md +0 -6
  39. package/docs/PipelineState.md +2 -0
  40. package/docs/SystemJobsApi.md +1 -1
  41. package/docs/UploadFormat.md +2 -0
  42. package/package.json +1 -1
  43. package/src/apis/DocumentsApi.ts +4 -11
  44. package/src/apis/SystemJobsApi.ts +4 -4
  45. package/src/models/DocumentVersionMetadata.ts +0 -15
  46. package/src/models/DocumentVersionMetadataUpdate.ts +0 -15
  47. package/src/models/IngestDocumentResponse.ts +0 -24
  48. package/src/models/PipelineState.ts +16 -1
  49. package/src/models/UploadFormat.ts +9 -0
  50. package/src/models/index.ts +0 -2
  51. package/dist/esm/models/EmailMetadata.d.ts +0 -119
  52. package/dist/esm/models/EmailMetadata.js +0 -65
  53. package/dist/esm/models/EmailParty.d.ts +0 -53
  54. package/dist/esm/models/EmailParty.js +0 -46
  55. package/dist/models/EmailMetadata.d.ts +0 -119
  56. package/dist/models/EmailMetadata.js +0 -73
  57. package/dist/models/EmailParty.d.ts +0 -53
  58. package/dist/models/EmailParty.js +0 -54
  59. package/docs/EmailMetadata.md +0 -57
  60. package/docs/EmailParty.md +0 -37
  61. package/src/models/EmailMetadata.ts +0 -183
  62. package/src/models/EmailParty.ts +0 -91
@@ -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
 
@@ -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
- }
@@ -1,53 +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
- /**
13
- * One email participant.
14
- * @export
15
- * @interface EmailParty
16
- */
17
- export interface EmailParty {
18
- /**
19
- * Display name; empty if unnamed
20
- * @type {string}
21
- * @memberof EmailParty
22
- */
23
- name?: string;
24
- /**
25
- * Email address
26
- * @type {string}
27
- * @memberof EmailParty
28
- */
29
- address: string;
30
- }
31
- export declare const EmailPartyPropertyValidationAttributesMap: {
32
- [property: string]: {
33
- maxLength?: number;
34
- minLength?: number;
35
- pattern?: string;
36
- maximum?: number;
37
- exclusiveMaximum?: boolean;
38
- minimum?: number;
39
- exclusiveMinimum?: boolean;
40
- multipleOf?: number;
41
- maxItems?: number;
42
- minItems?: number;
43
- uniqueItems?: boolean;
44
- };
45
- };
46
- /**
47
- * Check if a given object implements the EmailParty interface.
48
- */
49
- export declare function instanceOfEmailParty(value: object): value is EmailParty;
50
- export declare function EmailPartyFromJSON(json: any): EmailParty;
51
- export declare function EmailPartyFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailParty;
52
- export declare function EmailPartyToJSON(json: any): EmailParty;
53
- export declare function EmailPartyToJSONTyped(value?: EmailParty | null, ignoreDiscriminator?: boolean): any;
@@ -1,46 +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
- export const EmailPartyPropertyValidationAttributesMap = {};
15
- /**
16
- * Check if a given object implements the EmailParty interface.
17
- */
18
- export function instanceOfEmailParty(value) {
19
- if (!('address' in value) || value['address'] === undefined)
20
- return false;
21
- return true;
22
- }
23
- export function EmailPartyFromJSON(json) {
24
- return EmailPartyFromJSONTyped(json, false);
25
- }
26
- export function EmailPartyFromJSONTyped(json, ignoreDiscriminator) {
27
- if (json == null) {
28
- return json;
29
- }
30
- return {
31
- 'name': json['name'] == null ? undefined : json['name'],
32
- 'address': json['address'],
33
- };
34
- }
35
- export function EmailPartyToJSON(json) {
36
- return EmailPartyToJSONTyped(json, false);
37
- }
38
- export function EmailPartyToJSONTyped(value, ignoreDiscriminator = false) {
39
- if (value == null) {
40
- return value;
41
- }
42
- return {
43
- 'name': value['name'],
44
- 'address': value['address'],
45
- };
46
- }
@@ -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,73 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Knowledge Stack API
6
- * 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.
7
- *
8
- * The version of the OpenAPI document: 0.1.0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.EmailMetadataPropertyValidationAttributesMap = void 0;
17
- exports.instanceOfEmailMetadata = instanceOfEmailMetadata;
18
- exports.EmailMetadataFromJSON = EmailMetadataFromJSON;
19
- exports.EmailMetadataFromJSONTyped = EmailMetadataFromJSONTyped;
20
- exports.EmailMetadataToJSON = EmailMetadataToJSON;
21
- exports.EmailMetadataToJSONTyped = EmailMetadataToJSONTyped;
22
- const EmailParty_1 = require("./EmailParty");
23
- exports.EmailMetadataPropertyValidationAttributesMap = {};
24
- /**
25
- * Check if a given object implements the EmailMetadata interface.
26
- */
27
- function instanceOfEmailMetadata(value) {
28
- return true;
29
- }
30
- function EmailMetadataFromJSON(json) {
31
- return EmailMetadataFromJSONTyped(json, false);
32
- }
33
- function EmailMetadataFromJSONTyped(json, ignoreDiscriminator) {
34
- if (json == null) {
35
- return json;
36
- }
37
- return {
38
- 'subject': json['subject'] == null ? undefined : json['subject'],
39
- 'sender': json['sender'] == null ? undefined : (0, EmailParty_1.EmailPartyFromJSON)(json['sender']),
40
- 'to': json['to'] == null ? undefined : (json['to'].map(EmailParty_1.EmailPartyFromJSON)),
41
- 'cc': json['cc'] == null ? undefined : (json['cc'].map(EmailParty_1.EmailPartyFromJSON)),
42
- 'bcc': json['bcc'] == null ? undefined : (json['bcc'].map(EmailParty_1.EmailPartyFromJSON)),
43
- 'sentAt': json['sent_at'] == null ? undefined : json['sent_at'],
44
- 'messageId': json['message_id'] == null ? undefined : json['message_id'],
45
- 'inReplyTo': json['in_reply_to'] == null ? undefined : json['in_reply_to'],
46
- 'references': json['references'] == null ? undefined : json['references'],
47
- 'conversationTopic': json['conversation_topic'] == null ? undefined : json['conversation_topic'],
48
- 'threadRootId': json['thread_root_id'] == null ? undefined : json['thread_root_id'],
49
- 'rawHeaders': json['raw_headers'] == null ? undefined : json['raw_headers'],
50
- };
51
- }
52
- function EmailMetadataToJSON(json) {
53
- return EmailMetadataToJSONTyped(json, false);
54
- }
55
- function EmailMetadataToJSONTyped(value, ignoreDiscriminator = false) {
56
- if (value == null) {
57
- return value;
58
- }
59
- return {
60
- 'subject': value['subject'],
61
- 'sender': (0, EmailParty_1.EmailPartyToJSON)(value['sender']),
62
- 'to': value['to'] == null ? undefined : (value['to'].map(EmailParty_1.EmailPartyToJSON)),
63
- 'cc': value['cc'] == null ? undefined : (value['cc'].map(EmailParty_1.EmailPartyToJSON)),
64
- 'bcc': value['bcc'] == null ? undefined : (value['bcc'].map(EmailParty_1.EmailPartyToJSON)),
65
- 'sent_at': value['sentAt'],
66
- 'message_id': value['messageId'],
67
- 'in_reply_to': value['inReplyTo'],
68
- 'references': value['references'],
69
- 'conversation_topic': value['conversationTopic'],
70
- 'thread_root_id': value['threadRootId'],
71
- 'raw_headers': value['rawHeaders'],
72
- };
73
- }