@knowledge-stack/ksapi 1.135.1 → 1.136.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 +28 -4
- package/README.md +29 -4
- package/dist/apis/FoldersApi.d.ts +9 -9
- package/dist/apis/FoldersApi.js +2 -2
- package/dist/apis/SkillsApi.d.ts +579 -0
- package/dist/apis/SkillsApi.js +786 -0
- package/dist/apis/WorkflowDefinitionsApi.d.ts +3 -0
- package/dist/apis/WorkflowDefinitionsApi.js +3 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/FoldersApi.d.ts +9 -9
- package/dist/esm/apis/FoldersApi.js +3 -3
- package/dist/esm/apis/SkillsApi.d.ts +579 -0
- package/dist/esm/apis/SkillsApi.js +749 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +3 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.js +3 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ActivateSkillVersionRequest.d.ts +47 -0
- package/dist/esm/models/ActivateSkillVersionRequest.js +42 -0
- package/dist/esm/models/CreateSkillRequest.d.ts +60 -0
- package/dist/esm/models/CreateSkillRequest.js +59 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +6 -0
- package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
- package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +11 -6
- package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
- package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +12 -12
- package/dist/esm/models/PaginatedResponseSkillResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseSkillResponse.js +70 -0
- package/dist/esm/models/PartType.d.ts +1 -0
- package/dist/esm/models/PartType.js +2 -1
- package/dist/esm/models/ReferenceType.d.ts +1 -0
- package/dist/esm/models/ReferenceType.js +1 -0
- package/dist/esm/models/SearchSkillsRequest.d.ts +59 -0
- package/dist/esm/models/SearchSkillsRequest.js +64 -0
- package/dist/esm/models/SearchSkillsResponse.d.ts +48 -0
- package/dist/esm/models/SearchSkillsResponse.js +43 -0
- package/dist/esm/models/SkillOrder.d.ts +26 -0
- package/dist/esm/models/SkillOrder.js +44 -0
- package/dist/esm/models/SkillResponse.d.ts +147 -0
- package/dist/esm/models/SkillResponse.js +101 -0
- package/dist/esm/models/SkillScriptFile.d.ts +53 -0
- package/dist/esm/models/SkillScriptFile.js +52 -0
- package/dist/esm/models/SkillSearchResult.d.ts +71 -0
- package/dist/esm/models/SkillSearchResult.js +60 -0
- package/dist/esm/models/SkillVersionResponse.d.ts +71 -0
- package/dist/esm/models/SkillVersionResponse.js +58 -0
- package/dist/esm/models/UpdateSkillRequest.d.ts +54 -0
- package/dist/esm/models/UpdateSkillRequest.js +50 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +6 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/esm/models/WorkflowDefinitionResponse.js +2 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +2 -0
- package/dist/esm/models/index.d.ts +13 -2
- package/dist/esm/models/index.js +13 -2
- package/dist/models/ActivateSkillVersionRequest.d.ts +47 -0
- package/dist/models/ActivateSkillVersionRequest.js +50 -0
- package/dist/models/CreateSkillRequest.d.ts +60 -0
- package/dist/models/CreateSkillRequest.js +67 -0
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/models/CreateWorkflowDefinitionRequest.js +6 -0
- package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
- package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +15 -10
- package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
- package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +18 -18
- package/dist/models/PaginatedResponseSkillResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseSkillResponse.js +78 -0
- package/dist/models/PartType.d.ts +1 -0
- package/dist/models/PartType.js +2 -1
- package/dist/models/ReferenceType.d.ts +1 -0
- package/dist/models/ReferenceType.js +1 -0
- package/dist/models/SearchSkillsRequest.d.ts +59 -0
- package/dist/models/SearchSkillsRequest.js +72 -0
- package/dist/models/SearchSkillsResponse.d.ts +48 -0
- package/dist/models/SearchSkillsResponse.js +51 -0
- package/dist/models/SkillOrder.d.ts +26 -0
- package/dist/models/SkillOrder.js +52 -0
- package/dist/models/SkillResponse.d.ts +147 -0
- package/dist/models/SkillResponse.js +109 -0
- package/dist/models/SkillScriptFile.d.ts +53 -0
- package/dist/models/SkillScriptFile.js +60 -0
- package/dist/models/SkillSearchResult.d.ts +71 -0
- package/dist/models/SkillSearchResult.js +68 -0
- package/dist/models/SkillVersionResponse.d.ts +71 -0
- package/dist/models/SkillVersionResponse.js +66 -0
- package/dist/models/UpdateSkillRequest.d.ts +54 -0
- package/dist/models/UpdateSkillRequest.js +58 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.js +6 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
- package/dist/models/WorkflowDefinitionResponse.js +2 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
- package/dist/models/WorkflowRunSnapshot.js +2 -0
- package/dist/models/index.d.ts +13 -2
- package/dist/models/index.js +13 -2
- package/docs/ActivateSkillVersionRequest.md +35 -0
- package/docs/ChunksApi.md +1 -1
- package/docs/CreateSkillRequest.md +39 -0
- package/docs/CreateWorkflowDefinitionRequest.md +2 -0
- package/docs/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.md → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md} +12 -4
- package/docs/FoldersApi.md +4 -4
- package/docs/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.md → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.md} +5 -5
- package/docs/PaginatedResponseSkillResponse.md +40 -0
- package/docs/SearchSkillsRequest.md +39 -0
- package/docs/SearchSkillsResponse.md +34 -0
- package/docs/SkillOrder.md +33 -0
- package/docs/SkillResponse.md +65 -0
- package/docs/SkillScriptFile.md +37 -0
- package/docs/SkillSearchResult.md +43 -0
- package/docs/SkillVersionResponse.md +43 -0
- package/docs/SkillsApi.md +1093 -0
- package/docs/UpdateSkillRequest.md +37 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
- package/docs/WorkflowDefinitionResponse.md +2 -0
- package/docs/WorkflowDefinitionsApi.md +4 -1
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +13 -13
- package/src/apis/SkillsApi.ts +1321 -0
- package/src/apis/WorkflowDefinitionsApi.ts +7 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ActivateSkillVersionRequest.ts +82 -0
- package/src/models/CreateSkillRequest.ts +115 -0
- package/src/models/CreateWorkflowDefinitionRequest.ts +12 -0
- package/src/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.ts} +19 -8
- package/src/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.ts} +25 -25
- package/src/models/PaginatedResponseSkillResponse.ts +130 -0
- package/src/models/PartType.ts +2 -1
- package/src/models/ReferenceType.ts +1 -0
- package/src/models/SearchSkillsRequest.ts +114 -0
- package/src/models/SearchSkillsResponse.ts +90 -0
- package/src/models/SkillOrder.ts +54 -0
- package/src/models/SkillResponse.ts +244 -0
- package/src/models/SkillScriptFile.ts +95 -0
- package/src/models/SkillSearchResult.ts +119 -0
- package/src/models/SkillVersionResponse.ts +118 -0
- package/src/models/UpdateSkillRequest.ts +102 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +12 -0
- package/src/models/WorkflowDefinitionResponse.ts +8 -0
- package/src/models/WorkflowRunSnapshot.ts +8 -0
- package/src/models/index.ts +13 -2
|
@@ -67,6 +67,7 @@ export interface CreateWorkflowRunRequest {
|
|
|
67
67
|
autoStart?: boolean;
|
|
68
68
|
userMessage?: string | null;
|
|
69
69
|
name?: string | null;
|
|
70
|
+
selectedSkillIds?: string | null;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
export interface DeleteWorkflowDefinitionRequest {
|
|
@@ -151,6 +152,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
151
152
|
* @param {boolean} [autoStart] When true, the run starts itself once its ``inputs/`` uploads finish ingesting — eliminating the separate Start call. If an upload\\\'s ingestion fails, the run is marked FAILED. Default false (two-step flow). Arm only after all uploads are queued; a synchronously-completing first upload would otherwise start the run before later uploads are added.
|
|
152
153
|
* @param {string} [userMessage] Optional note carried to the auto-start dispatch (the equivalent of the Start endpoint\\\'s ``user_message`` for a self-starting run). Applied only when ``auto_start`` fires.
|
|
153
154
|
* @param {string} [name] Optional display name for the run. Omit to default to the run\\\'s UUID; rename later via PATCH. Must be unique among sibling runs under this definition\\\'s ``runs/`` folder — a collision returns 409.
|
|
155
|
+
* @param {string} [selectedSkillIds] JSON array of SKILL PDO UUIDs to force-load into this run ON TOP of the definition\\\'s prefill — the run\\\'s skills are the definition\\\'s list plus these additions. Each must be a SKILL the caller can read (else 400/403). Optional; omit to run with just the definition\\\'s skills.
|
|
154
156
|
* @throws {RequiredError}
|
|
155
157
|
* @memberof WorkflowDefinitionsApiInterface
|
|
156
158
|
*/
|
|
@@ -166,6 +168,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
166
168
|
* @param {boolean} [autoStart] When true, the run starts itself once its ``inputs/`` uploads finish ingesting — eliminating the separate Start call. If an upload\\\'s ingestion fails, the run is marked FAILED. Default false (two-step flow). Arm only after all uploads are queued; a synchronously-completing first upload would otherwise start the run before later uploads are added.
|
|
167
169
|
* @param {string} [userMessage] Optional note carried to the auto-start dispatch (the equivalent of the Start endpoint\\\'s ``user_message`` for a self-starting run). Applied only when ``auto_start`` fires.
|
|
168
170
|
* @param {string} [name] Optional display name for the run. Omit to default to the run\\\'s UUID; rename later via PATCH. Must be unique among sibling runs under this definition\\\'s ``runs/`` folder — a collision returns 409.
|
|
171
|
+
* @param {string} [selectedSkillIds] JSON array of SKILL PDO UUIDs to force-load into this run ON TOP of the definition\\\'s prefill — the run\\\'s skills are the definition\\\'s list plus these additions. Each must be a SKILL the caller can read (else 400/403). Optional; omit to run with just the definition\\\'s skills.
|
|
169
172
|
* @param {*} [options] Override http request option.
|
|
170
173
|
* @throws {RequiredError}
|
|
171
174
|
* @memberof WorkflowDefinitionsApiInterface
|
|
@@ -482,6 +485,10 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI implements WorkflowD
|
|
|
482
485
|
formParams.append('name', requestParameters['name'] as any);
|
|
483
486
|
}
|
|
484
487
|
|
|
488
|
+
if (requestParameters['selectedSkillIds'] != null) {
|
|
489
|
+
formParams.append('selected_skill_ids', requestParameters['selectedSkillIds'] as any);
|
|
490
|
+
}
|
|
491
|
+
|
|
485
492
|
|
|
486
493
|
let urlPath = `/v1/workflow-definitions/{definition_id}/runs`;
|
|
487
494
|
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
package/src/apis/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './PathPartApprovalsApi';
|
|
|
22
22
|
export * from './PathPartsApi';
|
|
23
23
|
export * from './PublicApi';
|
|
24
24
|
export * from './SectionsApi';
|
|
25
|
+
export * from './SkillsApi';
|
|
25
26
|
export * from './SubscriptionsApi';
|
|
26
27
|
export * from './SystemJobsApi';
|
|
27
28
|
export * from './TagsApi';
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
* Activate a specific published version.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ActivateSkillVersionRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ActivateSkillVersionRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Required (true) to activate when the working copy has unpublished edits — activating overwrites them. Otherwise the request is a 409.
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ActivateSkillVersionRequest
|
|
26
|
+
*/
|
|
27
|
+
confirmDiscardUnpublished?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export const ActivateSkillVersionRequestPropertyValidationAttributesMap: {
|
|
30
|
+
[property: string]: {
|
|
31
|
+
maxLength?: number,
|
|
32
|
+
minLength?: number,
|
|
33
|
+
pattern?: string,
|
|
34
|
+
maximum?: number,
|
|
35
|
+
exclusiveMaximum?: boolean,
|
|
36
|
+
minimum?: number,
|
|
37
|
+
exclusiveMinimum?: boolean,
|
|
38
|
+
multipleOf?: number,
|
|
39
|
+
maxItems?: number,
|
|
40
|
+
minItems?: number,
|
|
41
|
+
uniqueItems?: boolean
|
|
42
|
+
}
|
|
43
|
+
} = {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the ActivateSkillVersionRequest interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfActivateSkillVersionRequest(value: object): value is ActivateSkillVersionRequest {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ActivateSkillVersionRequestFromJSON(json: any): ActivateSkillVersionRequest {
|
|
55
|
+
return ActivateSkillVersionRequestFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ActivateSkillVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivateSkillVersionRequest {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'confirmDiscardUnpublished': json['confirm_discard_unpublished'] == null ? undefined : json['confirm_discard_unpublished'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ActivateSkillVersionRequestToJSON(json: any): ActivateSkillVersionRequest {
|
|
69
|
+
return ActivateSkillVersionRequestToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ActivateSkillVersionRequestToJSONTyped(value?: ActivateSkillVersionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'confirm_discard_unpublished': value['confirmDiscardUnpublished'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
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 { SkillScriptFile } from './SkillScriptFile';
|
|
17
|
+
import {
|
|
18
|
+
SkillScriptFileFromJSON,
|
|
19
|
+
SkillScriptFileFromJSONTyped,
|
|
20
|
+
SkillScriptFileToJSON,
|
|
21
|
+
SkillScriptFileToJSONTyped,
|
|
22
|
+
} from './SkillScriptFile';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Author a skill from a SKILL.md bundle.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateSkillRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateSkillRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Skill machine name (its folder name); unique within the tenant.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateSkillRequest
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Full SKILL.md content: YAML frontmatter with name + description, then the markdown instruction body.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateSkillRequest
|
|
40
|
+
*/
|
|
41
|
+
skillMd: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional scripts bundled under the skill's scripts/ folder.
|
|
44
|
+
* @type {Array<SkillScriptFile>}
|
|
45
|
+
* @memberof CreateSkillRequest
|
|
46
|
+
*/
|
|
47
|
+
scripts?: Array<SkillScriptFile>;
|
|
48
|
+
}
|
|
49
|
+
export const CreateSkillRequestPropertyValidationAttributesMap: {
|
|
50
|
+
[property: string]: {
|
|
51
|
+
maxLength?: number,
|
|
52
|
+
minLength?: number,
|
|
53
|
+
pattern?: string,
|
|
54
|
+
maximum?: number,
|
|
55
|
+
exclusiveMaximum?: boolean,
|
|
56
|
+
minimum?: number,
|
|
57
|
+
exclusiveMinimum?: boolean,
|
|
58
|
+
multipleOf?: number,
|
|
59
|
+
maxItems?: number,
|
|
60
|
+
minItems?: number,
|
|
61
|
+
uniqueItems?: boolean
|
|
62
|
+
}
|
|
63
|
+
} = {
|
|
64
|
+
name: {
|
|
65
|
+
maxLength: 255,
|
|
66
|
+
},
|
|
67
|
+
scripts: {
|
|
68
|
+
maxItems: 50,
|
|
69
|
+
uniqueItems: false,
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Check if a given object implements the CreateSkillRequest interface.
|
|
76
|
+
*/
|
|
77
|
+
export function instanceOfCreateSkillRequest(value: object): value is CreateSkillRequest {
|
|
78
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
79
|
+
if (!('skillMd' in value) || value['skillMd'] === undefined) return false;
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function CreateSkillRequestFromJSON(json: any): CreateSkillRequest {
|
|
84
|
+
return CreateSkillRequestFromJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function CreateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSkillRequest {
|
|
88
|
+
if (json == null) {
|
|
89
|
+
return json;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'name': json['name'],
|
|
94
|
+
'skillMd': json['skill_md'],
|
|
95
|
+
'scripts': json['scripts'] == null ? undefined : ((json['scripts'] as Array<any>).map(SkillScriptFileFromJSON)),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function CreateSkillRequestToJSON(json: any): CreateSkillRequest {
|
|
100
|
+
return CreateSkillRequestToJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function CreateSkillRequestToJSONTyped(value?: CreateSkillRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
104
|
+
if (value == null) {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'name': value['name'],
|
|
111
|
+
'skill_md': value['skillMd'],
|
|
112
|
+
'scripts': value['scripts'] == null ? undefined : ((value['scripts'] as Array<any>).map(SkillScriptFileToJSON)),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -65,6 +65,12 @@ export interface CreateWorkflowDefinitionRequest {
|
|
|
65
65
|
* @memberof CreateWorkflowDefinitionRequest
|
|
66
66
|
*/
|
|
67
67
|
isTemplate?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Skill PDO ids force-loaded into every run of this workflow by default (prefill). Each run inherits these and may add more; the agent can still discover others via search. Each must be a SKILL the caller can read.
|
|
70
|
+
* @type {Array<string>}
|
|
71
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
72
|
+
*/
|
|
73
|
+
selectedSkillIds?: Array<string>;
|
|
68
74
|
/**
|
|
69
75
|
* Optional path_part ids of common files (DOCUMENT / FOLDER / DATA_SOURCE / API_CONNECTION) attached to every run of this workflow — e.g. an output template. Merged with each run's own inputs at Start. The caller must be able to read each one.
|
|
70
76
|
* @type {Array<string>}
|
|
@@ -96,6 +102,10 @@ export const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
|
|
|
96
102
|
minimum: 60,
|
|
97
103
|
exclusiveMinimum: false,
|
|
98
104
|
},
|
|
105
|
+
selectedSkillIds: {
|
|
106
|
+
maxItems: 20,
|
|
107
|
+
uniqueItems: false,
|
|
108
|
+
},
|
|
99
109
|
commonFilePathPartIds: {
|
|
100
110
|
maxItems: 20,
|
|
101
111
|
uniqueItems: false,
|
|
@@ -130,6 +140,7 @@ export function CreateWorkflowDefinitionRequestFromJSONTyped(json: any, ignoreDi
|
|
|
130
140
|
'instructionPathPartId': json['instruction_path_part_id'] == null ? undefined : json['instruction_path_part_id'],
|
|
131
141
|
'approvalRequired': json['approval_required'],
|
|
132
142
|
'isTemplate': json['is_template'] == null ? undefined : json['is_template'],
|
|
143
|
+
'selectedSkillIds': json['selected_skill_ids'] == null ? undefined : json['selected_skill_ids'],
|
|
133
144
|
'commonFilePathPartIds': json['common_file_path_part_ids'] == null ? undefined : json['common_file_path_part_ids'],
|
|
134
145
|
};
|
|
135
146
|
}
|
|
@@ -152,6 +163,7 @@ export function CreateWorkflowDefinitionRequestToJSONTyped(value?: CreateWorkflo
|
|
|
152
163
|
'instruction_path_part_id': value['instructionPathPartId'],
|
|
153
164
|
'approval_required': value['approvalRequired'],
|
|
154
165
|
'is_template': value['isTemplate'],
|
|
166
|
+
'selected_skill_ids': value['selectedSkillIds'],
|
|
155
167
|
'common_file_path_part_ids': value['commonFilePathPartIds'],
|
|
156
168
|
};
|
|
157
169
|
}
|
|
@@ -54,6 +54,13 @@ import {
|
|
|
54
54
|
FolderResponseFromJSONTyped,
|
|
55
55
|
FolderResponseToJSON,
|
|
56
56
|
} from './FolderResponse';
|
|
57
|
+
import type { SkillResponse } from './SkillResponse';
|
|
58
|
+
import {
|
|
59
|
+
instanceOfSkillResponse,
|
|
60
|
+
SkillResponseFromJSON,
|
|
61
|
+
SkillResponseFromJSONTyped,
|
|
62
|
+
SkillResponseToJSON,
|
|
63
|
+
} from './SkillResponse';
|
|
57
64
|
import type { WorkflowDefinitionResponse } from './WorkflowDefinitionResponse';
|
|
58
65
|
import {
|
|
59
66
|
instanceOfWorkflowDefinitionResponse,
|
|
@@ -70,17 +77,17 @@ import {
|
|
|
70
77
|
} from './WorkflowRunResponse';
|
|
71
78
|
|
|
72
79
|
/**
|
|
73
|
-
* @type
|
|
80
|
+
* @type FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
|
|
74
81
|
*
|
|
75
82
|
* @export
|
|
76
83
|
*/
|
|
77
|
-
export type
|
|
84
|
+
export type FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR = { partType: 'API_CONNECTION' } & ApiConnectionResponse | { partType: 'DATA_SOURCE' } & DataSourceResponse | { partType: 'DATA_SOURCE_SCHEMA' } & DataSourceSchemaResponse | { partType: 'DATA_SOURCE_TABLE' } & DataSourceTableResponse | { partType: 'DOCUMENT' } & DocumentResponse | { partType: 'FOLDER' } & FolderResponse | { partType: 'SKILL' } & SkillResponse | { partType: 'WORKFLOW_DEFINITION' } & WorkflowDefinitionResponse | { partType: 'WORKFLOW_RUN' } & WorkflowRunResponse;
|
|
78
85
|
|
|
79
|
-
export function
|
|
80
|
-
return
|
|
86
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON(json: any): FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR {
|
|
87
|
+
return FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped(json, false);
|
|
81
88
|
}
|
|
82
89
|
|
|
83
|
-
export function
|
|
90
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR {
|
|
84
91
|
if (json == null) {
|
|
85
92
|
return json;
|
|
86
93
|
}
|
|
@@ -97,6 +104,8 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
97
104
|
return Object.assign({}, DocumentResponseFromJSONTyped(json, true), { partType: 'DOCUMENT' } as const);
|
|
98
105
|
case 'FOLDER':
|
|
99
106
|
return Object.assign({}, FolderResponseFromJSONTyped(json, true), { partType: 'FOLDER' } as const);
|
|
107
|
+
case 'SKILL':
|
|
108
|
+
return Object.assign({}, SkillResponseFromJSONTyped(json, true), { partType: 'SKILL' } as const);
|
|
100
109
|
case 'WORKFLOW_DEFINITION':
|
|
101
110
|
return Object.assign({}, WorkflowDefinitionResponseFromJSONTyped(json, true), { partType: 'WORKFLOW_DEFINITION' } as const);
|
|
102
111
|
case 'WORKFLOW_RUN':
|
|
@@ -106,11 +115,11 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
|
|
109
|
-
export function
|
|
110
|
-
return
|
|
118
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON(json: any): any {
|
|
119
|
+
return FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped(json, false);
|
|
111
120
|
}
|
|
112
121
|
|
|
113
|
-
export function
|
|
122
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped(value?: FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR | null, ignoreDiscriminator: boolean = false): any {
|
|
114
123
|
if (value == null) {
|
|
115
124
|
return value;
|
|
116
125
|
}
|
|
@@ -127,6 +136,8 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
127
136
|
return Object.assign({}, DocumentResponseToJSON(value), { partType: 'DOCUMENT' } as const);
|
|
128
137
|
case 'FOLDER':
|
|
129
138
|
return Object.assign({}, FolderResponseToJSON(value), { partType: 'FOLDER' } as const);
|
|
139
|
+
case 'SKILL':
|
|
140
|
+
return Object.assign({}, SkillResponseToJSON(value), { partType: 'SKILL' } as const);
|
|
130
141
|
case 'WORKFLOW_DEFINITION':
|
|
131
142
|
return Object.assign({}, WorkflowDefinitionResponseToJSON(value), { partType: 'WORKFLOW_DEFINITION' } as const);
|
|
132
143
|
case 'WORKFLOW_RUN':
|
|
@@ -13,46 +13,46 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON,
|
|
19
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped,
|
|
20
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON,
|
|
21
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped,
|
|
22
|
+
} from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
27
|
-
* @interface
|
|
27
|
+
* @interface PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
29
|
+
export interface PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
30
30
|
/**
|
|
31
31
|
* List of items
|
|
32
|
-
* @type {Array<
|
|
33
|
-
* @memberof
|
|
32
|
+
* @type {Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>}
|
|
33
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
34
34
|
*/
|
|
35
|
-
items: Array<
|
|
35
|
+
items: Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>;
|
|
36
36
|
/**
|
|
37
37
|
* Total number of items
|
|
38
38
|
* @type {number}
|
|
39
|
-
* @memberof
|
|
39
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
40
40
|
*/
|
|
41
41
|
total: number;
|
|
42
42
|
/**
|
|
43
43
|
* Number of items per page
|
|
44
44
|
* @type {number}
|
|
45
|
-
* @memberof
|
|
45
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
46
46
|
*/
|
|
47
47
|
limit: number;
|
|
48
48
|
/**
|
|
49
49
|
* Number of items to skip
|
|
50
50
|
* @type {number}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
52
52
|
*/
|
|
53
53
|
offset: number;
|
|
54
54
|
}
|
|
55
|
-
export const
|
|
55
|
+
export const PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatPropertyValidationAttributesMap: {
|
|
56
56
|
[property: string]: {
|
|
57
57
|
maxLength?: number,
|
|
58
58
|
minLength?: number,
|
|
@@ -83,9 +83,9 @@ export const PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkfl
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Check if a given object implements the
|
|
86
|
+
* Check if a given object implements the PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat interface.
|
|
87
87
|
*/
|
|
88
|
-
export function
|
|
88
|
+
export function instanceOfPaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat(value: object): value is PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
89
89
|
if (!('items' in value) || value['items'] === undefined) return false;
|
|
90
90
|
if (!('total' in value) || value['total'] === undefined) return false;
|
|
91
91
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
@@ -93,35 +93,35 @@ export function instanceOfPaginatedResponseAnnotatedUnionFolderResponseDocumentR
|
|
|
93
93
|
return true;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
97
|
-
return
|
|
96
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSON(json: any): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
97
|
+
return PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSONTyped(json, false);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export function
|
|
100
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
101
101
|
if (json == null) {
|
|
102
102
|
return json;
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
105
105
|
|
|
106
|
-
'items': ((json['items'] as Array<any>).map(
|
|
106
|
+
'items': ((json['items'] as Array<any>).map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON)),
|
|
107
107
|
'total': json['total'],
|
|
108
108
|
'limit': json['limit'],
|
|
109
109
|
'offset': json['offset'],
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
export function
|
|
114
|
-
return
|
|
113
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSON(json: any): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
114
|
+
return PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSONTyped(json, false);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
export function
|
|
117
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSONTyped(value?: PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat | null, ignoreDiscriminator: boolean = false): any {
|
|
118
118
|
if (value == null) {
|
|
119
119
|
return value;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
return {
|
|
123
123
|
|
|
124
|
-
'items': ((value['items'] as Array<any>).map(
|
|
124
|
+
'items': ((value['items'] as Array<any>).map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON)),
|
|
125
125
|
'total': value['total'],
|
|
126
126
|
'limit': value['limit'],
|
|
127
127
|
'offset': value['offset'],
|
|
@@ -0,0 +1,130 @@
|
|
|
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 { SkillResponse } from './SkillResponse';
|
|
17
|
+
import {
|
|
18
|
+
SkillResponseFromJSON,
|
|
19
|
+
SkillResponseFromJSONTyped,
|
|
20
|
+
SkillResponseToJSON,
|
|
21
|
+
SkillResponseToJSONTyped,
|
|
22
|
+
} from './SkillResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface PaginatedResponseSkillResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface PaginatedResponseSkillResponse {
|
|
30
|
+
/**
|
|
31
|
+
* List of items
|
|
32
|
+
* @type {Array<SkillResponse>}
|
|
33
|
+
* @memberof PaginatedResponseSkillResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<SkillResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Total number of items
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof PaginatedResponseSkillResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Number of items per page
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof PaginatedResponseSkillResponse
|
|
46
|
+
*/
|
|
47
|
+
limit: number;
|
|
48
|
+
/**
|
|
49
|
+
* Number of items to skip
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof PaginatedResponseSkillResponse
|
|
52
|
+
*/
|
|
53
|
+
offset: number;
|
|
54
|
+
}
|
|
55
|
+
export const PaginatedResponseSkillResponsePropertyValidationAttributesMap: {
|
|
56
|
+
[property: string]: {
|
|
57
|
+
maxLength?: number,
|
|
58
|
+
minLength?: number,
|
|
59
|
+
pattern?: string,
|
|
60
|
+
maximum?: number,
|
|
61
|
+
exclusiveMaximum?: boolean,
|
|
62
|
+
minimum?: number,
|
|
63
|
+
exclusiveMinimum?: boolean,
|
|
64
|
+
multipleOf?: number,
|
|
65
|
+
maxItems?: number,
|
|
66
|
+
minItems?: number,
|
|
67
|
+
uniqueItems?: boolean
|
|
68
|
+
}
|
|
69
|
+
} = {
|
|
70
|
+
total: {
|
|
71
|
+
minimum: 0,
|
|
72
|
+
exclusiveMinimum: false,
|
|
73
|
+
},
|
|
74
|
+
limit: {
|
|
75
|
+
minimum: 1,
|
|
76
|
+
exclusiveMinimum: false,
|
|
77
|
+
},
|
|
78
|
+
offset: {
|
|
79
|
+
minimum: 0,
|
|
80
|
+
exclusiveMinimum: false,
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Check if a given object implements the PaginatedResponseSkillResponse interface.
|
|
87
|
+
*/
|
|
88
|
+
export function instanceOfPaginatedResponseSkillResponse(value: object): value is PaginatedResponseSkillResponse {
|
|
89
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
90
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
91
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
92
|
+
if (!('offset' in value) || value['offset'] === undefined) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function PaginatedResponseSkillResponseFromJSON(json: any): PaginatedResponseSkillResponse {
|
|
97
|
+
return PaginatedResponseSkillResponseFromJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function PaginatedResponseSkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseSkillResponse {
|
|
101
|
+
if (json == null) {
|
|
102
|
+
return json;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'items': ((json['items'] as Array<any>).map(SkillResponseFromJSON)),
|
|
107
|
+
'total': json['total'],
|
|
108
|
+
'limit': json['limit'],
|
|
109
|
+
'offset': json['offset'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function PaginatedResponseSkillResponseToJSON(json: any): PaginatedResponseSkillResponse {
|
|
114
|
+
return PaginatedResponseSkillResponseToJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function PaginatedResponseSkillResponseToJSONTyped(value?: PaginatedResponseSkillResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
118
|
+
if (value == null) {
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'items': ((value['items'] as Array<any>).map(SkillResponseToJSON)),
|
|
125
|
+
'total': value['total'],
|
|
126
|
+
'limit': value['limit'],
|
|
127
|
+
'offset': value['offset'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
package/src/models/PartType.ts
CHANGED
|
@@ -30,7 +30,8 @@ export const PartType = {
|
|
|
30
30
|
DataSource: 'DATA_SOURCE',
|
|
31
31
|
DataSourceSchema: 'DATA_SOURCE_SCHEMA',
|
|
32
32
|
DataSourceTable: 'DATA_SOURCE_TABLE',
|
|
33
|
-
ApiConnection: 'API_CONNECTION'
|
|
33
|
+
ApiConnection: 'API_CONNECTION',
|
|
34
|
+
Skill: 'SKILL'
|
|
34
35
|
} as const;
|
|
35
36
|
export type PartType = typeof PartType[keyof typeof PartType];
|
|
36
37
|
|