@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
@@ -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
- }
@@ -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,54 +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.EmailPartyPropertyValidationAttributesMap = void 0;
17
- exports.instanceOfEmailParty = instanceOfEmailParty;
18
- exports.EmailPartyFromJSON = EmailPartyFromJSON;
19
- exports.EmailPartyFromJSONTyped = EmailPartyFromJSONTyped;
20
- exports.EmailPartyToJSON = EmailPartyToJSON;
21
- exports.EmailPartyToJSONTyped = EmailPartyToJSONTyped;
22
- exports.EmailPartyPropertyValidationAttributesMap = {};
23
- /**
24
- * Check if a given object implements the EmailParty interface.
25
- */
26
- function instanceOfEmailParty(value) {
27
- if (!('address' in value) || value['address'] === undefined)
28
- return false;
29
- return true;
30
- }
31
- function EmailPartyFromJSON(json) {
32
- return EmailPartyFromJSONTyped(json, false);
33
- }
34
- function EmailPartyFromJSONTyped(json, ignoreDiscriminator) {
35
- if (json == null) {
36
- return json;
37
- }
38
- return {
39
- 'name': json['name'] == null ? undefined : json['name'],
40
- 'address': json['address'],
41
- };
42
- }
43
- function EmailPartyToJSON(json) {
44
- return EmailPartyToJSONTyped(json, false);
45
- }
46
- function EmailPartyToJSONTyped(value, ignoreDiscriminator = false) {
47
- if (value == null) {
48
- return value;
49
- }
50
- return {
51
- 'name': value['name'],
52
- 'address': value['address'],
53
- };
54
- }
@@ -1,57 +0,0 @@
1
-
2
- # EmailMetadata
3
-
4
- Structured headers of an ingested email (EMAIL document type only). Populated by ``document_preparation_activity`` from the same parse that renders the message body, so the stored metadata and the rendered document cannot disagree. Null on a multi-message archive: its messages are ingested as their own documents, and each carries its own block.
5
-
6
- ## Properties
7
-
8
- Name | Type
9
- ------------ | -------------
10
- `subject` | string
11
- `sender` | [EmailParty](EmailParty.md)
12
- `to` | [Array&lt;EmailParty&gt;](EmailParty.md)
13
- `cc` | [Array&lt;EmailParty&gt;](EmailParty.md)
14
- `bcc` | [Array&lt;EmailParty&gt;](EmailParty.md)
15
- `sentAt` | string
16
- `messageId` | string
17
- `inReplyTo` | string
18
- `references` | Array&lt;string&gt;
19
- `conversationTopic` | string
20
- `threadRootId` | string
21
- `rawHeaders` | string
22
-
23
- ## Example
24
-
25
- ```typescript
26
- import type { EmailMetadata } from '@knowledge-stack/ksapi'
27
-
28
- // TODO: Update the object below with actual values
29
- const example = {
30
- "subject": null,
31
- "sender": null,
32
- "to": null,
33
- "cc": null,
34
- "bcc": null,
35
- "sentAt": null,
36
- "messageId": null,
37
- "inReplyTo": null,
38
- "references": null,
39
- "conversationTopic": null,
40
- "threadRootId": null,
41
- "rawHeaders": null,
42
- } satisfies EmailMetadata
43
-
44
- console.log(example)
45
-
46
- // Convert the instance to a JSON string
47
- const exampleJSON: string = JSON.stringify(example)
48
- console.log(exampleJSON)
49
-
50
- // Parse the JSON string back to an object
51
- const exampleParsed = JSON.parse(exampleJSON) as EmailMetadata
52
- console.log(exampleParsed)
53
- ```
54
-
55
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
56
-
57
-
@@ -1,37 +0,0 @@
1
-
2
- # EmailParty
3
-
4
- One email participant.
5
-
6
- ## Properties
7
-
8
- Name | Type
9
- ------------ | -------------
10
- `name` | string
11
- `address` | string
12
-
13
- ## Example
14
-
15
- ```typescript
16
- import type { EmailParty } from '@knowledge-stack/ksapi'
17
-
18
- // TODO: Update the object below with actual values
19
- const example = {
20
- "name": null,
21
- "address": null,
22
- } satisfies EmailParty
23
-
24
- console.log(example)
25
-
26
- // Convert the instance to a JSON string
27
- const exampleJSON: string = JSON.stringify(example)
28
- console.log(exampleJSON)
29
-
30
- // Parse the JSON string back to an object
31
- const exampleParsed = JSON.parse(exampleJSON) as EmailParty
32
- console.log(exampleParsed)
33
- ```
34
-
35
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
-
37
-