@knowledge-stack/ksapi 1.152.0 → 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
|
@@ -26,7 +26,8 @@ exports.IngestionModeToJSONTyped = IngestionModeToJSONTyped;
|
|
|
26
26
|
exports.IngestionMode = {
|
|
27
27
|
HighAccuracy: 'high_accuracy',
|
|
28
28
|
Standard: 'standard',
|
|
29
|
-
SingleChunk: 'single_chunk'
|
|
29
|
+
SingleChunk: 'single_chunk',
|
|
30
|
+
Media: 'media'
|
|
30
31
|
};
|
|
31
32
|
function instanceOfIngestionMode(value) {
|
|
32
33
|
for (const key in exports.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}
|
|
@@ -34,6 +34,8 @@ function instanceOfSubscriptionPlanResponse(value) {
|
|
|
34
34
|
return false;
|
|
35
35
|
if (!('searches' in value) || value['searches'] === undefined)
|
|
36
36
|
return false;
|
|
37
|
+
if (!('mediaMinutes' in value) || value['mediaMinutes'] === undefined)
|
|
38
|
+
return false;
|
|
37
39
|
if (!('maxSeats' in value) || value['maxSeats'] === undefined)
|
|
38
40
|
return false;
|
|
39
41
|
if (!('_public' in value) || value['_public'] === undefined)
|
|
@@ -57,6 +59,7 @@ function SubscriptionPlanResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
59
|
'ingestedPages': json['ingested_pages'],
|
|
58
60
|
'messages': json['messages'],
|
|
59
61
|
'searches': json['searches'],
|
|
62
|
+
'mediaMinutes': json['media_minutes'],
|
|
60
63
|
'maxSeats': json['max_seats'],
|
|
61
64
|
'_public': json['public'],
|
|
62
65
|
'createdAt': (new Date(json['created_at'])),
|
|
@@ -76,6 +79,7 @@ function SubscriptionPlanResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
76
79
|
'ingested_pages': value['ingestedPages'],
|
|
77
80
|
'messages': value['messages'],
|
|
78
81
|
'searches': value['searches'],
|
|
82
|
+
'media_minutes': value['mediaMinutes'],
|
|
79
83
|
'max_seats': value['maxSeats'],
|
|
80
84
|
'public': value['_public'],
|
|
81
85
|
'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,60 @@
|
|
|
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.UploadPartResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUploadPartResponse = instanceOfUploadPartResponse;
|
|
18
|
+
exports.UploadPartResponseFromJSON = UploadPartResponseFromJSON;
|
|
19
|
+
exports.UploadPartResponseFromJSONTyped = UploadPartResponseFromJSONTyped;
|
|
20
|
+
exports.UploadPartResponseToJSON = UploadPartResponseToJSON;
|
|
21
|
+
exports.UploadPartResponseToJSONTyped = UploadPartResponseToJSONTyped;
|
|
22
|
+
exports.UploadPartResponsePropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the UploadPartResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfUploadPartResponse(value) {
|
|
27
|
+
if (!('partNumber' in value) || value['partNumber'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('etag' in value) || value['etag'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function UploadPartResponseFromJSON(json) {
|
|
36
|
+
return UploadPartResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function UploadPartResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'partNumber': json['part_number'],
|
|
44
|
+
'etag': json['etag'],
|
|
45
|
+
'size': json['size'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function UploadPartResponseToJSON(json) {
|
|
49
|
+
return UploadPartResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function UploadPartResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'part_number': value['partNumber'],
|
|
57
|
+
'etag': value['etag'],
|
|
58
|
+
'size': value['size'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,57 @@
|
|
|
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.UploadStatusResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUploadStatusResponse = instanceOfUploadStatusResponse;
|
|
18
|
+
exports.UploadStatusResponseFromJSON = UploadStatusResponseFromJSON;
|
|
19
|
+
exports.UploadStatusResponseFromJSONTyped = UploadStatusResponseFromJSONTyped;
|
|
20
|
+
exports.UploadStatusResponseToJSON = UploadStatusResponseToJSON;
|
|
21
|
+
exports.UploadStatusResponseToJSONTyped = UploadStatusResponseToJSONTyped;
|
|
22
|
+
const UploadPartResponse_1 = require("./UploadPartResponse");
|
|
23
|
+
exports.UploadStatusResponsePropertyValidationAttributesMap = {};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the UploadStatusResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfUploadStatusResponse(value) {
|
|
28
|
+
if (!('parts' in value) || value['parts'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('uploadedBytes' in value) || value['uploadedBytes'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function UploadStatusResponseFromJSON(json) {
|
|
35
|
+
return UploadStatusResponseFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function UploadStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'parts': (json['parts'].map(UploadPartResponse_1.UploadPartResponseFromJSON)),
|
|
43
|
+
'uploadedBytes': json['uploaded_bytes'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function UploadStatusResponseToJSON(json) {
|
|
47
|
+
return UploadStatusResponseToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function UploadStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'parts': (value['parts'].map(UploadPartResponse_1.UploadPartResponseToJSON)),
|
|
55
|
+
'uploaded_bytes': value['uploadedBytes'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare const UsageMetric: {
|
|
|
17
17
|
readonly Page: 'PAGE';
|
|
18
18
|
readonly Search: 'SEARCH';
|
|
19
19
|
readonly Message: 'MESSAGE';
|
|
20
|
+
readonly MediaMinute: 'MEDIA_MINUTE';
|
|
20
21
|
};
|
|
21
22
|
export type UsageMetric = typeof UsageMetric[keyof typeof UsageMetric];
|
|
22
23
|
export declare function instanceOfUsageMetric(value: any): boolean;
|
|
@@ -26,7 +26,8 @@ exports.UsageMetricToJSONTyped = UsageMetricToJSONTyped;
|
|
|
26
26
|
exports.UsageMetric = {
|
|
27
27
|
Page: 'PAGE',
|
|
28
28
|
Search: 'SEARCH',
|
|
29
|
-
Message: 'MESSAGE'
|
|
29
|
+
Message: 'MESSAGE',
|
|
30
|
+
MediaMinute: 'MEDIA_MINUTE'
|
|
30
31
|
};
|
|
31
32
|
function instanceOfUsageMetric(value) {
|
|
32
33
|
for (const key in exports.UsageMetric) {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './CloneWorkflowRunRequest';
|
|
|
47
47
|
export * from './ColumnConfig';
|
|
48
48
|
export * from './ColumnReference';
|
|
49
49
|
export * from './CommonFileExclusionReason';
|
|
50
|
+
export * from './CompleteUploadRequest';
|
|
50
51
|
export * from './ConnectionConfig';
|
|
51
52
|
export * from './ContentsSortOrder';
|
|
52
53
|
export * from './CreateApiConnectionRequest';
|
|
@@ -67,6 +68,8 @@ export * from './CreateSkillRequest';
|
|
|
67
68
|
export * from './CreateTagRequest';
|
|
68
69
|
export * from './CreateThreadMessageRequest';
|
|
69
70
|
export * from './CreateThreadRequest';
|
|
71
|
+
export * from './CreateUploadRequest';
|
|
72
|
+
export * from './CreateUploadResponse';
|
|
70
73
|
export * from './CreateWorkflowDefinitionRequest';
|
|
71
74
|
export * from './DataSourceCatalogResponse';
|
|
72
75
|
export * from './DataSourceDescribeResponse';
|
|
@@ -328,6 +331,8 @@ export * from './UpdateWorkflowDefinitionRequest';
|
|
|
328
331
|
export * from './UpdateWorkflowRunRequest';
|
|
329
332
|
export * from './UploadConstraints';
|
|
330
333
|
export * from './UploadFormat';
|
|
334
|
+
export * from './UploadPartResponse';
|
|
335
|
+
export * from './UploadStatusResponse';
|
|
331
336
|
export * from './UsageMetric';
|
|
332
337
|
export * from './UserInfo';
|
|
333
338
|
export * from './UserMessageRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -65,6 +65,7 @@ __exportStar(require("./CloneWorkflowRunRequest"), exports);
|
|
|
65
65
|
__exportStar(require("./ColumnConfig"), exports);
|
|
66
66
|
__exportStar(require("./ColumnReference"), exports);
|
|
67
67
|
__exportStar(require("./CommonFileExclusionReason"), exports);
|
|
68
|
+
__exportStar(require("./CompleteUploadRequest"), exports);
|
|
68
69
|
__exportStar(require("./ConnectionConfig"), exports);
|
|
69
70
|
__exportStar(require("./ContentsSortOrder"), exports);
|
|
70
71
|
__exportStar(require("./CreateApiConnectionRequest"), exports);
|
|
@@ -85,6 +86,8 @@ __exportStar(require("./CreateSkillRequest"), exports);
|
|
|
85
86
|
__exportStar(require("./CreateTagRequest"), exports);
|
|
86
87
|
__exportStar(require("./CreateThreadMessageRequest"), exports);
|
|
87
88
|
__exportStar(require("./CreateThreadRequest"), exports);
|
|
89
|
+
__exportStar(require("./CreateUploadRequest"), exports);
|
|
90
|
+
__exportStar(require("./CreateUploadResponse"), exports);
|
|
88
91
|
__exportStar(require("./CreateWorkflowDefinitionRequest"), exports);
|
|
89
92
|
__exportStar(require("./DataSourceCatalogResponse"), exports);
|
|
90
93
|
__exportStar(require("./DataSourceDescribeResponse"), exports);
|
|
@@ -346,6 +349,8 @@ __exportStar(require("./UpdateWorkflowDefinitionRequest"), exports);
|
|
|
346
349
|
__exportStar(require("./UpdateWorkflowRunRequest"), exports);
|
|
347
350
|
__exportStar(require("./UploadConstraints"), exports);
|
|
348
351
|
__exportStar(require("./UploadFormat"), exports);
|
|
352
|
+
__exportStar(require("./UploadPartResponse"), exports);
|
|
353
|
+
__exportStar(require("./UploadStatusResponse"), exports);
|
|
349
354
|
__exportStar(require("./UsageMetric"), exports);
|
|
350
355
|
__exportStar(require("./UserInfo"), exports);
|
|
351
356
|
__exportStar(require("./UserMessageRequest"), exports);
|
package/docs/ChunkMetadata.md
CHANGED
|
@@ -13,6 +13,8 @@ Name | Type
|
|
|
13
13
|
`summarizeForEmbedding` | boolean
|
|
14
14
|
`extractedTextS3Uri` | string
|
|
15
15
|
`secondaryTaxonomy` | [ImageTaxonomy](ImageTaxonomy.md)
|
|
16
|
+
`startMs` | number
|
|
17
|
+
`endMs` | number
|
|
16
18
|
`sheetName` | string
|
|
17
19
|
`blockType` | string
|
|
18
20
|
`sourceUri` | string
|
|
@@ -36,6 +38,8 @@ const example = {
|
|
|
36
38
|
"summarizeForEmbedding": null,
|
|
37
39
|
"extractedTextS3Uri": null,
|
|
38
40
|
"secondaryTaxonomy": null,
|
|
41
|
+
"startMs": null,
|
|
42
|
+
"endMs": null,
|
|
39
43
|
"sheetName": null,
|
|
40
44
|
"blockType": null,
|
|
41
45
|
"sourceUri": null,
|
package/docs/Citation.md
CHANGED
|
@@ -10,6 +10,8 @@ Name | Type
|
|
|
10
10
|
`quote` | string
|
|
11
11
|
`startChar` | number
|
|
12
12
|
`length` | number
|
|
13
|
+
`startMs` | number
|
|
14
|
+
`endMs` | number
|
|
13
15
|
|
|
14
16
|
## Example
|
|
15
17
|
|
|
@@ -22,6 +24,8 @@ const example = {
|
|
|
22
24
|
"quote": null,
|
|
23
25
|
"startChar": null,
|
|
24
26
|
"length": null,
|
|
27
|
+
"startMs": null,
|
|
28
|
+
"endMs": null,
|
|
25
29
|
} satisfies Citation
|
|
26
30
|
|
|
27
31
|
console.log(example)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# CompleteUploadRequest
|
|
3
|
+
|
|
4
|
+
Finalize a resumable upload and start ingestion.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`uploadToken` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { CompleteUploadRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"uploadToken": null,
|
|
20
|
+
} satisfies CompleteUploadRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as CompleteUploadRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateUploadRequest
|
|
3
|
+
|
|
4
|
+
Begin a resumable upload.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`parentPathId` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`filename` | string
|
|
13
|
+
`sizeBytes` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { CreateUploadRequest } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"parentPathId": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
"filename": null,
|
|
25
|
+
"sizeBytes": null,
|
|
26
|
+
} satisfies CreateUploadRequest
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateUploadRequest
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateUploadResponse
|
|
3
|
+
|
|
4
|
+
Handles for a started resumable upload.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`documentId` | string
|
|
11
|
+
`documentVersionId` | string
|
|
12
|
+
`uploadToken` | string
|
|
13
|
+
`partSize` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { CreateUploadResponse } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"documentId": null,
|
|
23
|
+
"documentVersionId": null,
|
|
24
|
+
"uploadToken": null,
|
|
25
|
+
"partSize": null,
|
|
26
|
+
} satisfies CreateUploadResponse
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateUploadResponse
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|