@knowledge-stack/ksapi 1.151.1 → 1.153.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 +10 -0
- package/README.md +12 -2
- package/dist/apis/DocumentsApi.d.ts +197 -1
- package/dist/apis/DocumentsApi.js +256 -0
- package/dist/esm/apis/DocumentsApi.d.ts +197 -1
- package/dist/esm/apis/DocumentsApi.js +257 -1
- package/dist/esm/models/ChunkMetadata.d.ts +12 -0
- package/dist/esm/models/ChunkMetadata.js +4 -0
- package/dist/esm/models/Citation.d.ts +12 -0
- package/dist/esm/models/Citation.js +4 -0
- package/dist/esm/models/CompleteUploadRequest.d.ts +47 -0
- package/dist/esm/models/CompleteUploadRequest.js +44 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +65 -0
- package/dist/esm/models/CreateUploadRequest.js +56 -0
- package/dist/esm/models/CreateUploadResponse.d.ts +65 -0
- package/dist/esm/models/CreateUploadResponse.js +56 -0
- package/dist/esm/models/DocumentType.d.ts +2 -0
- package/dist/esm/models/DocumentType.js +2 -0
- package/dist/esm/models/EnrichedCitation.d.ts +12 -0
- package/dist/esm/models/EnrichedCitation.js +4 -0
- package/dist/esm/models/IngestionMode.d.ts +1 -0
- package/dist/esm/models/IngestionMode.js +2 -1
- package/dist/esm/models/SubscriptionPlanResponse.d.ts +6 -0
- package/dist/esm/models/SubscriptionPlanResponse.js +4 -0
- package/dist/esm/models/UploadPartResponse.d.ts +59 -0
- package/dist/esm/models/UploadPartResponse.js +52 -0
- package/dist/esm/models/UploadStatusResponse.d.ts +54 -0
- package/dist/esm/models/UploadStatusResponse.js +49 -0
- package/dist/esm/models/UsageMetric.d.ts +1 -0
- package/dist/esm/models/UsageMetric.js +2 -1
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ChunkMetadata.d.ts +12 -0
- package/dist/models/ChunkMetadata.js +4 -0
- package/dist/models/Citation.d.ts +12 -0
- package/dist/models/Citation.js +4 -0
- package/dist/models/CompleteUploadRequest.d.ts +47 -0
- package/dist/models/CompleteUploadRequest.js +52 -0
- package/dist/models/CreateUploadRequest.d.ts +65 -0
- package/dist/models/CreateUploadRequest.js +64 -0
- package/dist/models/CreateUploadResponse.d.ts +65 -0
- package/dist/models/CreateUploadResponse.js +64 -0
- package/dist/models/DocumentType.d.ts +2 -0
- package/dist/models/DocumentType.js +2 -0
- package/dist/models/EnrichedCitation.d.ts +12 -0
- package/dist/models/EnrichedCitation.js +4 -0
- package/dist/models/IngestionMode.d.ts +1 -0
- package/dist/models/IngestionMode.js +2 -1
- package/dist/models/SubscriptionPlanResponse.d.ts +6 -0
- package/dist/models/SubscriptionPlanResponse.js +4 -0
- package/dist/models/UploadPartResponse.d.ts +59 -0
- package/dist/models/UploadPartResponse.js +60 -0
- package/dist/models/UploadStatusResponse.d.ts +54 -0
- package/dist/models/UploadStatusResponse.js +57 -0
- package/dist/models/UsageMetric.d.ts +1 -0
- package/dist/models/UsageMetric.js +2 -1
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/ChunkMetadata.md +4 -0
- package/docs/Citation.md +4 -0
- package/docs/CompleteUploadRequest.md +35 -0
- package/docs/CreateUploadRequest.md +41 -0
- package/docs/CreateUploadResponse.md +41 -0
- package/docs/DocumentsApi.md +390 -4
- package/docs/EnrichedCitation.md +4 -0
- package/docs/SubscriptionPlanResponse.md +2 -0
- package/docs/UploadPartResponse.md +39 -0
- package/docs/UploadStatusResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +466 -0
- package/src/models/ChunkMetadata.ts +16 -0
- package/src/models/Citation.ts +16 -0
- package/src/models/CompleteUploadRequest.ts +83 -0
- package/src/models/CreateUploadRequest.ts +110 -0
- package/src/models/CreateUploadResponse.ts +110 -0
- package/src/models/DocumentType.ts +2 -0
- package/src/models/EnrichedCitation.ts +16 -0
- package/src/models/IngestionMode.ts +2 -1
- package/src/models/SubscriptionPlanResponse.ts +9 -0
- package/src/models/UploadPartResponse.ts +101 -0
- package/src/models/UploadStatusResponse.ts +100 -0
- package/src/models/UsageMetric.ts +2 -1
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
* Finalize a resumable upload and start ingestion.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CompleteUploadRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CompleteUploadRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Token from create-upload
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CompleteUploadRequest
|
|
22
|
+
*/
|
|
23
|
+
uploadToken: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const CompleteUploadRequestPropertyValidationAttributesMap: {
|
|
26
|
+
[property: string]: {
|
|
27
|
+
maxLength?: number;
|
|
28
|
+
minLength?: number;
|
|
29
|
+
pattern?: string;
|
|
30
|
+
maximum?: number;
|
|
31
|
+
exclusiveMaximum?: boolean;
|
|
32
|
+
minimum?: number;
|
|
33
|
+
exclusiveMinimum?: boolean;
|
|
34
|
+
multipleOf?: number;
|
|
35
|
+
maxItems?: number;
|
|
36
|
+
minItems?: number;
|
|
37
|
+
uniqueItems?: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the CompleteUploadRequest interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfCompleteUploadRequest(value: object): value is CompleteUploadRequest;
|
|
44
|
+
export declare function CompleteUploadRequestFromJSON(json: any): CompleteUploadRequest;
|
|
45
|
+
export declare function CompleteUploadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompleteUploadRequest;
|
|
46
|
+
export declare function CompleteUploadRequestToJSON(json: any): CompleteUploadRequest;
|
|
47
|
+
export declare function CompleteUploadRequestToJSONTyped(value?: CompleteUploadRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 CompleteUploadRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CompleteUploadRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCompleteUploadRequest(value) {
|
|
19
|
+
if (!('uploadToken' in value) || value['uploadToken'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function CompleteUploadRequestFromJSON(json) {
|
|
24
|
+
return CompleteUploadRequestFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function CompleteUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'uploadToken': json['upload_token'],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function CompleteUploadRequestToJSON(json) {
|
|
35
|
+
return CompleteUploadRequestToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function CompleteUploadRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'upload_token': value['uploadToken'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
* Begin a resumable upload.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateUploadRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateUploadRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Parent folder path part ID (FOLDER)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateUploadRequest
|
|
22
|
+
*/
|
|
23
|
+
parentPathId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Document name
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateUploadRequest
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Original filename; its extension selects the type + size cap
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateUploadRequest
|
|
34
|
+
*/
|
|
35
|
+
filename: string;
|
|
36
|
+
/**
|
|
37
|
+
* Declared total size; fast-rejected against the type cap
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CreateUploadRequest
|
|
40
|
+
*/
|
|
41
|
+
sizeBytes: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const CreateUploadRequestPropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the CreateUploadRequest interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfCreateUploadRequest(value: object): value is CreateUploadRequest;
|
|
62
|
+
export declare function CreateUploadRequestFromJSON(json: any): CreateUploadRequest;
|
|
63
|
+
export declare function CreateUploadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUploadRequest;
|
|
64
|
+
export declare function CreateUploadRequestToJSON(json: any): CreateUploadRequest;
|
|
65
|
+
export declare function CreateUploadRequestToJSONTyped(value?: CreateUploadRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 CreateUploadRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CreateUploadRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCreateUploadRequest(value) {
|
|
19
|
+
if (!('parentPathId' in value) || value['parentPathId'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('filename' in value) || value['filename'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('sizeBytes' in value) || value['sizeBytes'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function CreateUploadRequestFromJSON(json) {
|
|
30
|
+
return CreateUploadRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function CreateUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'parentPathId': json['parent_path_id'],
|
|
38
|
+
'name': json['name'],
|
|
39
|
+
'filename': json['filename'],
|
|
40
|
+
'sizeBytes': json['size_bytes'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function CreateUploadRequestToJSON(json) {
|
|
44
|
+
return CreateUploadRequestToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function CreateUploadRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'parent_path_id': value['parentPathId'],
|
|
52
|
+
'name': value['name'],
|
|
53
|
+
'filename': value['filename'],
|
|
54
|
+
'size_bytes': value['sizeBytes'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
* Handles for a started resumable upload.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateUploadResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateUploadResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateUploadResponse
|
|
22
|
+
*/
|
|
23
|
+
documentId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateUploadResponse
|
|
28
|
+
*/
|
|
29
|
+
documentVersionId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Opaque token; return it on every part/status/complete/abort
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateUploadResponse
|
|
34
|
+
*/
|
|
35
|
+
uploadToken: string;
|
|
36
|
+
/**
|
|
37
|
+
* Recommended part size in bytes; every part except the last must be at least 5 MiB
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CreateUploadResponse
|
|
40
|
+
*/
|
|
41
|
+
partSize: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const CreateUploadResponsePropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the CreateUploadResponse interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfCreateUploadResponse(value: object): value is CreateUploadResponse;
|
|
62
|
+
export declare function CreateUploadResponseFromJSON(json: any): CreateUploadResponse;
|
|
63
|
+
export declare function CreateUploadResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUploadResponse;
|
|
64
|
+
export declare function CreateUploadResponseToJSON(json: any): CreateUploadResponse;
|
|
65
|
+
export declare function CreateUploadResponseToJSONTyped(value?: CreateUploadResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 CreateUploadResponsePropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the CreateUploadResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfCreateUploadResponse(value) {
|
|
19
|
+
if (!('documentId' in value) || value['documentId'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('uploadToken' in value) || value['uploadToken'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('partSize' in value) || value['partSize'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function CreateUploadResponseFromJSON(json) {
|
|
30
|
+
return CreateUploadResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function CreateUploadResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'documentId': json['document_id'],
|
|
38
|
+
'documentVersionId': json['document_version_id'],
|
|
39
|
+
'uploadToken': json['upload_token'],
|
|
40
|
+
'partSize': json['part_size'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function CreateUploadResponseToJSON(json) {
|
|
44
|
+
return CreateUploadResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function CreateUploadResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'document_id': value['documentId'],
|
|
52
|
+
'document_version_id': value['documentVersionId'],
|
|
53
|
+
'upload_token': value['uploadToken'],
|
|
54
|
+
'part_size': value['partSize'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -24,6 +24,8 @@ export declare const DocumentType: {
|
|
|
24
24
|
readonly Json: 'JSON';
|
|
25
25
|
readonly Yaml: 'YAML';
|
|
26
26
|
readonly Code: 'CODE';
|
|
27
|
+
readonly Audio: 'AUDIO';
|
|
28
|
+
readonly Video: 'VIDEO';
|
|
27
29
|
readonly Unknown: 'UNKNOWN';
|
|
28
30
|
};
|
|
29
31
|
export type DocumentType = typeof DocumentType[keyof typeof DocumentType];
|
|
@@ -39,6 +39,18 @@ export interface EnrichedCitation {
|
|
|
39
39
|
* @memberof EnrichedCitation
|
|
40
40
|
*/
|
|
41
41
|
length: number;
|
|
42
|
+
/**
|
|
43
|
+
* Start time (ms) of the cited chunk in the source media, for AUDIO/VIDEO — lets the client deep-link playback to the moment. None for non-media chunks.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof EnrichedCitation
|
|
46
|
+
*/
|
|
47
|
+
startMs?: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* End time (ms) of the cited chunk in the source media (AUDIO/VIDEO); None for non-media chunks.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof EnrichedCitation
|
|
52
|
+
*/
|
|
53
|
+
endMs?: number | null;
|
|
42
54
|
/**
|
|
43
55
|
*
|
|
44
56
|
* @type {string}
|
|
@@ -43,6 +43,8 @@ export function EnrichedCitationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'quote': json['quote'],
|
|
44
44
|
'startChar': json['start_char'],
|
|
45
45
|
'length': json['length'],
|
|
46
|
+
'startMs': json['start_ms'] == null ? undefined : json['start_ms'],
|
|
47
|
+
'endMs': json['end_ms'] == null ? undefined : json['end_ms'],
|
|
46
48
|
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
47
49
|
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
48
50
|
'documentName': json['document_name'] == null ? undefined : json['document_name'],
|
|
@@ -63,6 +65,8 @@ export function EnrichedCitationToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
63
65
|
'quote': value['quote'],
|
|
64
66
|
'start_char': value['startChar'],
|
|
65
67
|
'length': value['length'],
|
|
68
|
+
'start_ms': value['startMs'],
|
|
69
|
+
'end_ms': value['endMs'],
|
|
66
70
|
'document_id': value['documentId'],
|
|
67
71
|
'document_version_id': value['documentVersionId'],
|
|
68
72
|
'document_name': value['documentName'],
|
|
@@ -17,6 +17,7 @@ export declare const IngestionMode: {
|
|
|
17
17
|
readonly HighAccuracy: 'high_accuracy';
|
|
18
18
|
readonly Standard: 'standard';
|
|
19
19
|
readonly SingleChunk: 'single_chunk';
|
|
20
|
+
readonly Media: 'media';
|
|
20
21
|
};
|
|
21
22
|
export type IngestionMode = typeof IngestionMode[keyof typeof IngestionMode];
|
|
22
23
|
export declare function instanceOfIngestionMode(value: any): boolean;
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
export const IngestionMode = {
|
|
19
19
|
HighAccuracy: 'high_accuracy',
|
|
20
20
|
Standard: 'standard',
|
|
21
|
-
SingleChunk: 'single_chunk'
|
|
21
|
+
SingleChunk: 'single_chunk',
|
|
22
|
+
Media: 'media'
|
|
22
23
|
};
|
|
23
24
|
export function instanceOfIngestionMode(value) {
|
|
24
25
|
for (const key in IngestionMode) {
|
|
@@ -51,6 +51,12 @@ export interface SubscriptionPlanResponse {
|
|
|
51
51
|
* @memberof SubscriptionPlanResponse
|
|
52
52
|
*/
|
|
53
53
|
searches: number;
|
|
54
|
+
/**
|
|
55
|
+
* Per-period cap on transcribed media minutes (MEDIA_MINUTE).
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof SubscriptionPlanResponse
|
|
58
|
+
*/
|
|
59
|
+
mediaMinutes: number;
|
|
54
60
|
/**
|
|
55
61
|
* Upper bound on num_seats accepted by the upgrade endpoint. Admin PATCH may set tenant.seats above this value.
|
|
56
62
|
* @type {number}
|
|
@@ -26,6 +26,8 @@ export function instanceOfSubscriptionPlanResponse(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('searches' in value) || value['searches'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('mediaMinutes' in value) || value['mediaMinutes'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('maxSeats' in value) || value['maxSeats'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('_public' in value) || value['_public'] === undefined)
|
|
@@ -49,6 +51,7 @@ export function SubscriptionPlanResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
49
51
|
'ingestedPages': json['ingested_pages'],
|
|
50
52
|
'messages': json['messages'],
|
|
51
53
|
'searches': json['searches'],
|
|
54
|
+
'mediaMinutes': json['media_minutes'],
|
|
52
55
|
'maxSeats': json['max_seats'],
|
|
53
56
|
'_public': json['public'],
|
|
54
57
|
'createdAt': (new Date(json['created_at'])),
|
|
@@ -68,6 +71,7 @@ export function SubscriptionPlanResponseToJSONTyped(value, ignoreDiscriminator =
|
|
|
68
71
|
'ingested_pages': value['ingestedPages'],
|
|
69
72
|
'messages': value['messages'],
|
|
70
73
|
'searches': value['searches'],
|
|
74
|
+
'media_minutes': value['mediaMinutes'],
|
|
71
75
|
'max_seats': value['maxSeats'],
|
|
72
76
|
'public': value['_public'],
|
|
73
77
|
'created_at': value['createdAt'].toISOString(),
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* Acknowledgement of one stored part.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UploadPartResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface UploadPartResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof UploadPartResponse
|
|
22
|
+
*/
|
|
23
|
+
partNumber: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UploadPartResponse
|
|
28
|
+
*/
|
|
29
|
+
etag: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof UploadPartResponse
|
|
34
|
+
*/
|
|
35
|
+
size: number;
|
|
36
|
+
}
|
|
37
|
+
export declare const UploadPartResponsePropertyValidationAttributesMap: {
|
|
38
|
+
[property: string]: {
|
|
39
|
+
maxLength?: number;
|
|
40
|
+
minLength?: number;
|
|
41
|
+
pattern?: string;
|
|
42
|
+
maximum?: number;
|
|
43
|
+
exclusiveMaximum?: boolean;
|
|
44
|
+
minimum?: number;
|
|
45
|
+
exclusiveMinimum?: boolean;
|
|
46
|
+
multipleOf?: number;
|
|
47
|
+
maxItems?: number;
|
|
48
|
+
minItems?: number;
|
|
49
|
+
uniqueItems?: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the UploadPartResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfUploadPartResponse(value: object): value is UploadPartResponse;
|
|
56
|
+
export declare function UploadPartResponseFromJSON(json: any): UploadPartResponse;
|
|
57
|
+
export declare function UploadPartResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadPartResponse;
|
|
58
|
+
export declare function UploadPartResponseToJSON(json: any): UploadPartResponse;
|
|
59
|
+
export declare function UploadPartResponseToJSONTyped(value?: UploadPartResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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 UploadPartResponsePropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the UploadPartResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfUploadPartResponse(value) {
|
|
19
|
+
if (!('partNumber' in value) || value['partNumber'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('etag' in value) || value['etag'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function UploadPartResponseFromJSON(json) {
|
|
28
|
+
return UploadPartResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function UploadPartResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'partNumber': json['part_number'],
|
|
36
|
+
'etag': json['etag'],
|
|
37
|
+
'size': json['size'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function UploadPartResponseToJSON(json) {
|
|
41
|
+
return UploadPartResponseToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function UploadPartResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'part_number': value['partNumber'],
|
|
49
|
+
'etag': value['etag'],
|
|
50
|
+
'size': value['size'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { UploadPartResponse } from './UploadPartResponse';
|
|
13
|
+
/**
|
|
14
|
+
* Parts S3 already holds — resume by re-sending the rest.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UploadStatusResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface UploadStatusResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<UploadPartResponse>}
|
|
22
|
+
* @memberof UploadStatusResponse
|
|
23
|
+
*/
|
|
24
|
+
parts: Array<UploadPartResponse>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof UploadStatusResponse
|
|
29
|
+
*/
|
|
30
|
+
uploadedBytes: number;
|
|
31
|
+
}
|
|
32
|
+
export declare const UploadStatusResponsePropertyValidationAttributesMap: {
|
|
33
|
+
[property: string]: {
|
|
34
|
+
maxLength?: number;
|
|
35
|
+
minLength?: number;
|
|
36
|
+
pattern?: string;
|
|
37
|
+
maximum?: number;
|
|
38
|
+
exclusiveMaximum?: boolean;
|
|
39
|
+
minimum?: number;
|
|
40
|
+
exclusiveMinimum?: boolean;
|
|
41
|
+
multipleOf?: number;
|
|
42
|
+
maxItems?: number;
|
|
43
|
+
minItems?: number;
|
|
44
|
+
uniqueItems?: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the UploadStatusResponse interface.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instanceOfUploadStatusResponse(value: object): value is UploadStatusResponse;
|
|
51
|
+
export declare function UploadStatusResponseFromJSON(json: any): UploadStatusResponse;
|
|
52
|
+
export declare function UploadStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadStatusResponse;
|
|
53
|
+
export declare function UploadStatusResponseToJSON(json: any): UploadStatusResponse;
|
|
54
|
+
export declare function UploadStatusResponseToJSONTyped(value?: UploadStatusResponse | null, ignoreDiscriminator?: boolean): any;
|