@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.
- package/.openapi-generator/FILES +0 -4
- package/README.md +2 -4
- package/dist/apis/DocumentsApi.d.ts +4 -7
- package/dist/apis/DocumentsApi.js +2 -5
- package/dist/apis/SystemJobsApi.d.ts +4 -4
- package/dist/apis/SystemJobsApi.js +2 -2
- package/dist/esm/apis/DocumentsApi.d.ts +4 -7
- package/dist/esm/apis/DocumentsApi.js +2 -5
- package/dist/esm/apis/SystemJobsApi.d.ts +4 -4
- package/dist/esm/apis/SystemJobsApi.js +2 -2
- package/dist/esm/models/DocumentVersionMetadata.d.ts +0 -7
- package/dist/esm/models/DocumentVersionMetadata.js +0 -3
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +0 -7
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +0 -3
- package/dist/esm/models/IngestDocumentResponse.d.ts +0 -18
- package/dist/esm/models/IngestDocumentResponse.js +0 -6
- package/dist/esm/models/PipelineState.d.ts +8 -1
- package/dist/esm/models/PipelineState.js +3 -0
- package/dist/esm/models/UploadFormat.d.ts +6 -0
- package/dist/esm/models/UploadFormat.js +4 -0
- package/dist/esm/models/index.d.ts +0 -2
- package/dist/esm/models/index.js +0 -2
- package/dist/models/DocumentVersionMetadata.d.ts +0 -7
- package/dist/models/DocumentVersionMetadata.js +0 -3
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +0 -7
- package/dist/models/DocumentVersionMetadataUpdate.js +0 -3
- package/dist/models/IngestDocumentResponse.d.ts +0 -18
- package/dist/models/IngestDocumentResponse.js +0 -6
- package/dist/models/PipelineState.d.ts +8 -1
- package/dist/models/PipelineState.js +3 -0
- package/dist/models/UploadFormat.d.ts +6 -0
- package/dist/models/UploadFormat.js +4 -0
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +0 -2
- package/docs/DocumentVersionMetadata.md +0 -2
- package/docs/DocumentVersionMetadataUpdate.md +0 -2
- package/docs/DocumentsApi.md +2 -5
- package/docs/IngestDocumentResponse.md +0 -6
- package/docs/PipelineState.md +2 -0
- package/docs/SystemJobsApi.md +1 -1
- package/docs/UploadFormat.md +2 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +4 -11
- package/src/apis/SystemJobsApi.ts +4 -4
- package/src/models/DocumentVersionMetadata.ts +0 -15
- package/src/models/DocumentVersionMetadataUpdate.ts +0 -15
- package/src/models/IngestDocumentResponse.ts +0 -24
- package/src/models/PipelineState.ts +16 -1
- package/src/models/UploadFormat.ts +9 -0
- package/src/models/index.ts +0 -2
- package/dist/esm/models/EmailMetadata.d.ts +0 -119
- package/dist/esm/models/EmailMetadata.js +0 -65
- package/dist/esm/models/EmailParty.d.ts +0 -53
- package/dist/esm/models/EmailParty.js +0 -46
- package/dist/models/EmailMetadata.d.ts +0 -119
- package/dist/models/EmailMetadata.js +0 -73
- package/dist/models/EmailParty.d.ts +0 -53
- package/dist/models/EmailParty.js +0 -54
- package/docs/EmailMetadata.md +0 -57
- package/docs/EmailParty.md +0 -37
- package/src/models/EmailMetadata.ts +0 -183
- 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,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
|
-
}
|
package/docs/EmailMetadata.md
DELETED
|
@@ -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<EmailParty>](EmailParty.md)
|
|
13
|
-
`cc` | [Array<EmailParty>](EmailParty.md)
|
|
14
|
-
`bcc` | [Array<EmailParty>](EmailParty.md)
|
|
15
|
-
`sentAt` | string
|
|
16
|
-
`messageId` | string
|
|
17
|
-
`inReplyTo` | string
|
|
18
|
-
`references` | Array<string>
|
|
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
|
-
|
package/docs/EmailParty.md
DELETED
|
@@ -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
|
-
|
|
@@ -1,183 +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
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
import type { EmailParty } from './EmailParty';
|
|
17
|
-
import {
|
|
18
|
-
EmailPartyFromJSON,
|
|
19
|
-
EmailPartyFromJSONTyped,
|
|
20
|
-
EmailPartyToJSON,
|
|
21
|
-
EmailPartyToJSONTyped,
|
|
22
|
-
} from './EmailParty';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Structured headers of an ingested email (EMAIL document type only).
|
|
26
|
-
*
|
|
27
|
-
* Populated by ``document_preparation_activity`` from the same parse that
|
|
28
|
-
* renders the message body, so the stored metadata and the rendered document
|
|
29
|
-
* cannot disagree. Null on a multi-message archive: its messages are ingested
|
|
30
|
-
* as their own documents, and each carries its own block.
|
|
31
|
-
* @export
|
|
32
|
-
* @interface EmailMetadata
|
|
33
|
-
*/
|
|
34
|
-
export interface EmailMetadata {
|
|
35
|
-
/**
|
|
36
|
-
* Message subject
|
|
37
|
-
* @type {string}
|
|
38
|
-
* @memberof EmailMetadata
|
|
39
|
-
*/
|
|
40
|
-
subject?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Sender; null if unparseable
|
|
43
|
-
* @type {EmailParty}
|
|
44
|
-
* @memberof EmailMetadata
|
|
45
|
-
*/
|
|
46
|
-
sender?: EmailParty | null;
|
|
47
|
-
/**
|
|
48
|
-
* To recipients
|
|
49
|
-
* @type {Array<EmailParty>}
|
|
50
|
-
* @memberof EmailMetadata
|
|
51
|
-
*/
|
|
52
|
-
to?: Array<EmailParty>;
|
|
53
|
-
/**
|
|
54
|
-
* Cc recipients
|
|
55
|
-
* @type {Array<EmailParty>}
|
|
56
|
-
* @memberof EmailMetadata
|
|
57
|
-
*/
|
|
58
|
-
cc?: Array<EmailParty>;
|
|
59
|
-
/**
|
|
60
|
-
* 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.
|
|
61
|
-
* @type {Array<EmailParty>}
|
|
62
|
-
* @memberof EmailMetadata
|
|
63
|
-
*/
|
|
64
|
-
bcc?: Array<EmailParty>;
|
|
65
|
-
/**
|
|
66
|
-
* Date header, as written
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @memberof EmailMetadata
|
|
69
|
-
*/
|
|
70
|
-
sentAt?: string;
|
|
71
|
-
/**
|
|
72
|
-
* RFC 5322 Message-ID
|
|
73
|
-
* @type {string}
|
|
74
|
-
* @memberof EmailMetadata
|
|
75
|
-
*/
|
|
76
|
-
messageId?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Message-ID being replied to
|
|
79
|
-
* @type {string}
|
|
80
|
-
* @memberof EmailMetadata
|
|
81
|
-
*/
|
|
82
|
-
inReplyTo?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Reply chain, oldest first
|
|
85
|
-
* @type {Array<string>}
|
|
86
|
-
* @memberof EmailMetadata
|
|
87
|
-
*/
|
|
88
|
-
references?: Array<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Outlook PidTagConversationTopic (.msg only)
|
|
91
|
-
* @type {string}
|
|
92
|
-
* @memberof EmailMetadata
|
|
93
|
-
*/
|
|
94
|
-
conversationTopic?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Message-ID that started the thread — the first References entry, or this message's own id. Group by this to reconstruct a thread.
|
|
97
|
-
* @type {string}
|
|
98
|
-
* @memberof EmailMetadata
|
|
99
|
-
*/
|
|
100
|
-
threadRootId?: string;
|
|
101
|
-
/**
|
|
102
|
-
* The verbatim header block, so a header this schema does not model stays recoverable without re-reading the source file.
|
|
103
|
-
* @type {string}
|
|
104
|
-
* @memberof EmailMetadata
|
|
105
|
-
*/
|
|
106
|
-
rawHeaders?: string;
|
|
107
|
-
}
|
|
108
|
-
export const EmailMetadataPropertyValidationAttributesMap: {
|
|
109
|
-
[property: string]: {
|
|
110
|
-
maxLength?: number,
|
|
111
|
-
minLength?: number,
|
|
112
|
-
pattern?: string,
|
|
113
|
-
maximum?: number,
|
|
114
|
-
exclusiveMaximum?: boolean,
|
|
115
|
-
minimum?: number,
|
|
116
|
-
exclusiveMinimum?: boolean,
|
|
117
|
-
multipleOf?: number,
|
|
118
|
-
maxItems?: number,
|
|
119
|
-
minItems?: number,
|
|
120
|
-
uniqueItems?: boolean
|
|
121
|
-
}
|
|
122
|
-
} = {
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Check if a given object implements the EmailMetadata interface.
|
|
128
|
-
*/
|
|
129
|
-
export function instanceOfEmailMetadata(value: object): value is EmailMetadata {
|
|
130
|
-
return true;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function EmailMetadataFromJSON(json: any): EmailMetadata {
|
|
134
|
-
return EmailMetadataFromJSONTyped(json, false);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function EmailMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailMetadata {
|
|
138
|
-
if (json == null) {
|
|
139
|
-
return json;
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
|
|
143
|
-
'subject': json['subject'] == null ? undefined : json['subject'],
|
|
144
|
-
'sender': json['sender'] == null ? undefined : EmailPartyFromJSON(json['sender']),
|
|
145
|
-
'to': json['to'] == null ? undefined : ((json['to'] as Array<any>).map(EmailPartyFromJSON)),
|
|
146
|
-
'cc': json['cc'] == null ? undefined : ((json['cc'] as Array<any>).map(EmailPartyFromJSON)),
|
|
147
|
-
'bcc': json['bcc'] == null ? undefined : ((json['bcc'] as Array<any>).map(EmailPartyFromJSON)),
|
|
148
|
-
'sentAt': json['sent_at'] == null ? undefined : json['sent_at'],
|
|
149
|
-
'messageId': json['message_id'] == null ? undefined : json['message_id'],
|
|
150
|
-
'inReplyTo': json['in_reply_to'] == null ? undefined : json['in_reply_to'],
|
|
151
|
-
'references': json['references'] == null ? undefined : json['references'],
|
|
152
|
-
'conversationTopic': json['conversation_topic'] == null ? undefined : json['conversation_topic'],
|
|
153
|
-
'threadRootId': json['thread_root_id'] == null ? undefined : json['thread_root_id'],
|
|
154
|
-
'rawHeaders': json['raw_headers'] == null ? undefined : json['raw_headers'],
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export function EmailMetadataToJSON(json: any): EmailMetadata {
|
|
159
|
-
return EmailMetadataToJSONTyped(json, false);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export function EmailMetadataToJSONTyped(value?: EmailMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
163
|
-
if (value == null) {
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return {
|
|
168
|
-
|
|
169
|
-
'subject': value['subject'],
|
|
170
|
-
'sender': EmailPartyToJSON(value['sender']),
|
|
171
|
-
'to': value['to'] == null ? undefined : ((value['to'] as Array<any>).map(EmailPartyToJSON)),
|
|
172
|
-
'cc': value['cc'] == null ? undefined : ((value['cc'] as Array<any>).map(EmailPartyToJSON)),
|
|
173
|
-
'bcc': value['bcc'] == null ? undefined : ((value['bcc'] as Array<any>).map(EmailPartyToJSON)),
|
|
174
|
-
'sent_at': value['sentAt'],
|
|
175
|
-
'message_id': value['messageId'],
|
|
176
|
-
'in_reply_to': value['inReplyTo'],
|
|
177
|
-
'references': value['references'],
|
|
178
|
-
'conversation_topic': value['conversationTopic'],
|
|
179
|
-
'thread_root_id': value['threadRootId'],
|
|
180
|
-
'raw_headers': value['rawHeaders'],
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
|
package/src/models/EmailParty.ts
DELETED
|
@@ -1,91 +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
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
* One email participant.
|
|
18
|
-
* @export
|
|
19
|
-
* @interface EmailParty
|
|
20
|
-
*/
|
|
21
|
-
export interface EmailParty {
|
|
22
|
-
/**
|
|
23
|
-
* Display name; empty if unnamed
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof EmailParty
|
|
26
|
-
*/
|
|
27
|
-
name?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Email address
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof EmailParty
|
|
32
|
-
*/
|
|
33
|
-
address: string;
|
|
34
|
-
}
|
|
35
|
-
export const EmailPartyPropertyValidationAttributesMap: {
|
|
36
|
-
[property: string]: {
|
|
37
|
-
maxLength?: number,
|
|
38
|
-
minLength?: number,
|
|
39
|
-
pattern?: string,
|
|
40
|
-
maximum?: number,
|
|
41
|
-
exclusiveMaximum?: boolean,
|
|
42
|
-
minimum?: number,
|
|
43
|
-
exclusiveMinimum?: boolean,
|
|
44
|
-
multipleOf?: number,
|
|
45
|
-
maxItems?: number,
|
|
46
|
-
minItems?: number,
|
|
47
|
-
uniqueItems?: boolean
|
|
48
|
-
}
|
|
49
|
-
} = {
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Check if a given object implements the EmailParty interface.
|
|
55
|
-
*/
|
|
56
|
-
export function instanceOfEmailParty(value: object): value is EmailParty {
|
|
57
|
-
if (!('address' in value) || value['address'] === undefined) return false;
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function EmailPartyFromJSON(json: any): EmailParty {
|
|
62
|
-
return EmailPartyFromJSONTyped(json, false);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function EmailPartyFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailParty {
|
|
66
|
-
if (json == null) {
|
|
67
|
-
return json;
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
|
|
71
|
-
'name': json['name'] == null ? undefined : json['name'],
|
|
72
|
-
'address': json['address'],
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function EmailPartyToJSON(json: any): EmailParty {
|
|
77
|
-
return EmailPartyToJSONTyped(json, false);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function EmailPartyToJSONTyped(value?: EmailParty | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
-
if (value == null) {
|
|
82
|
-
return value;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
|
|
87
|
-
'name': value['name'],
|
|
88
|
-
'address': value['address'],
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|