@knowledge-stack/ksapi 1.135.0 → 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
|
@@ -22,6 +22,7 @@ export interface CreateWorkflowRunRequest {
|
|
|
22
22
|
autoStart?: boolean;
|
|
23
23
|
userMessage?: string | null;
|
|
24
24
|
name?: string | null;
|
|
25
|
+
selectedSkillIds?: string | null;
|
|
25
26
|
}
|
|
26
27
|
export interface DeleteWorkflowDefinitionRequest {
|
|
27
28
|
definitionId: string;
|
|
@@ -96,6 +97,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
96
97
|
* @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.
|
|
97
98
|
* @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.
|
|
98
99
|
* @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.
|
|
100
|
+
* @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.
|
|
99
101
|
* @throws {RequiredError}
|
|
100
102
|
* @memberof WorkflowDefinitionsApiInterface
|
|
101
103
|
*/
|
|
@@ -110,6 +112,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
110
112
|
* @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.
|
|
111
113
|
* @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.
|
|
112
114
|
* @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.
|
|
115
|
+
* @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.
|
|
113
116
|
* @param {*} [options] Override http request option.
|
|
114
117
|
* @throws {RequiredError}
|
|
115
118
|
* @memberof WorkflowDefinitionsApiInterface
|
|
@@ -125,6 +125,9 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI {
|
|
|
125
125
|
if (requestParameters['name'] != null) {
|
|
126
126
|
formParams.append('name', requestParameters['name']);
|
|
127
127
|
}
|
|
128
|
+
if (requestParameters['selectedSkillIds'] != null) {
|
|
129
|
+
formParams.append('selected_skill_ids', requestParameters['selectedSkillIds']);
|
|
130
|
+
}
|
|
128
131
|
let urlPath = `/v1/workflow-definitions/{definition_id}/runs`;
|
|
129
132
|
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
130
133
|
return {
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './PathPartApprovalsApi';
|
|
|
20
20
|
export * from './PathPartsApi';
|
|
21
21
|
export * from './PublicApi';
|
|
22
22
|
export * from './SectionsApi';
|
|
23
|
+
export * from './SkillsApi';
|
|
23
24
|
export * from './SubscriptionsApi';
|
|
24
25
|
export * from './SystemJobsApi';
|
|
25
26
|
export * from './TagsApi';
|
package/dist/esm/apis/index.js
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,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
|
+
* Activate a specific published version.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ActivateSkillVersionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface ActivateSkillVersionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Required (true) to activate when the working copy has unpublished edits — activating overwrites them. Otherwise the request is a 409.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof ActivateSkillVersionRequest
|
|
22
|
+
*/
|
|
23
|
+
confirmDiscardUnpublished?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const ActivateSkillVersionRequestPropertyValidationAttributesMap: {
|
|
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 ActivateSkillVersionRequest interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfActivateSkillVersionRequest(value: object): value is ActivateSkillVersionRequest;
|
|
44
|
+
export declare function ActivateSkillVersionRequestFromJSON(json: any): ActivateSkillVersionRequest;
|
|
45
|
+
export declare function ActivateSkillVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivateSkillVersionRequest;
|
|
46
|
+
export declare function ActivateSkillVersionRequestToJSON(json: any): ActivateSkillVersionRequest;
|
|
47
|
+
export declare function ActivateSkillVersionRequestToJSONTyped(value?: ActivateSkillVersionRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 ActivateSkillVersionRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ActivateSkillVersionRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfActivateSkillVersionRequest(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ActivateSkillVersionRequestFromJSON(json) {
|
|
22
|
+
return ActivateSkillVersionRequestFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ActivateSkillVersionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'confirmDiscardUnpublished': json['confirm_discard_unpublished'] == null ? undefined : json['confirm_discard_unpublished'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ActivateSkillVersionRequestToJSON(json) {
|
|
33
|
+
return ActivateSkillVersionRequestToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ActivateSkillVersionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'confirm_discard_unpublished': value['confirmDiscardUnpublished'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { SkillScriptFile } from './SkillScriptFile';
|
|
13
|
+
/**
|
|
14
|
+
* Author a skill from a SKILL.md bundle.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface CreateSkillRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface CreateSkillRequest {
|
|
19
|
+
/**
|
|
20
|
+
* Skill machine name (its folder name); unique within the tenant.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CreateSkillRequest
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Full SKILL.md content: YAML frontmatter with name + description, then the markdown instruction body.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CreateSkillRequest
|
|
29
|
+
*/
|
|
30
|
+
skillMd: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional scripts bundled under the skill's scripts/ folder.
|
|
33
|
+
* @type {Array<SkillScriptFile>}
|
|
34
|
+
* @memberof CreateSkillRequest
|
|
35
|
+
*/
|
|
36
|
+
scripts?: Array<SkillScriptFile>;
|
|
37
|
+
}
|
|
38
|
+
export declare const CreateSkillRequestPropertyValidationAttributesMap: {
|
|
39
|
+
[property: string]: {
|
|
40
|
+
maxLength?: number;
|
|
41
|
+
minLength?: number;
|
|
42
|
+
pattern?: string;
|
|
43
|
+
maximum?: number;
|
|
44
|
+
exclusiveMaximum?: boolean;
|
|
45
|
+
minimum?: number;
|
|
46
|
+
exclusiveMinimum?: boolean;
|
|
47
|
+
multipleOf?: number;
|
|
48
|
+
maxItems?: number;
|
|
49
|
+
minItems?: number;
|
|
50
|
+
uniqueItems?: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CreateSkillRequest interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfCreateSkillRequest(value: object): value is CreateSkillRequest;
|
|
57
|
+
export declare function CreateSkillRequestFromJSON(json: any): CreateSkillRequest;
|
|
58
|
+
export declare function CreateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSkillRequest;
|
|
59
|
+
export declare function CreateSkillRequestToJSON(json: any): CreateSkillRequest;
|
|
60
|
+
export declare function CreateSkillRequestToJSONTyped(value?: CreateSkillRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
import { SkillScriptFileFromJSON, SkillScriptFileToJSON, } from './SkillScriptFile';
|
|
15
|
+
export const CreateSkillRequestPropertyValidationAttributesMap = {
|
|
16
|
+
name: {
|
|
17
|
+
maxLength: 255,
|
|
18
|
+
},
|
|
19
|
+
scripts: {
|
|
20
|
+
maxItems: 50,
|
|
21
|
+
uniqueItems: false,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the CreateSkillRequest interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfCreateSkillRequest(value) {
|
|
28
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('skillMd' in value) || value['skillMd'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
export function CreateSkillRequestFromJSON(json) {
|
|
35
|
+
return CreateSkillRequestFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function CreateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'name': json['name'],
|
|
43
|
+
'skillMd': json['skill_md'],
|
|
44
|
+
'scripts': json['scripts'] == null ? undefined : (json['scripts'].map(SkillScriptFileFromJSON)),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function CreateSkillRequestToJSON(json) {
|
|
48
|
+
return CreateSkillRequestToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function CreateSkillRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'name': value['name'],
|
|
56
|
+
'skill_md': value['skillMd'],
|
|
57
|
+
'scripts': value['scripts'] == null ? undefined : (value['scripts'].map(SkillScriptFileToJSON)),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -61,6 +61,12 @@ export interface CreateWorkflowDefinitionRequest {
|
|
|
61
61
|
* @memberof CreateWorkflowDefinitionRequest
|
|
62
62
|
*/
|
|
63
63
|
isTemplate?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
* @type {Array<string>}
|
|
67
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
68
|
+
*/
|
|
69
|
+
selectedSkillIds?: Array<string>;
|
|
64
70
|
/**
|
|
65
71
|
* 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.
|
|
66
72
|
* @type {Array<string>}
|
|
@@ -21,6 +21,10 @@ export const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
|
|
|
21
21
|
minimum: 60,
|
|
22
22
|
exclusiveMinimum: false,
|
|
23
23
|
},
|
|
24
|
+
selectedSkillIds: {
|
|
25
|
+
maxItems: 20,
|
|
26
|
+
uniqueItems: false,
|
|
27
|
+
},
|
|
24
28
|
commonFilePathPartIds: {
|
|
25
29
|
maxItems: 20,
|
|
26
30
|
uniqueItems: false,
|
|
@@ -53,6 +57,7 @@ export function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscrim
|
|
|
53
57
|
'instructionPathPartId': json['instruction_path_part_id'] == null ? undefined : json['instruction_path_part_id'],
|
|
54
58
|
'approvalRequired': json['approval_required'],
|
|
55
59
|
'isTemplate': json['is_template'] == null ? undefined : json['is_template'],
|
|
60
|
+
'selectedSkillIds': json['selected_skill_ids'] == null ? undefined : json['selected_skill_ids'],
|
|
56
61
|
'commonFilePathPartIds': json['common_file_path_part_ids'] == null ? undefined : json['common_file_path_part_ids'],
|
|
57
62
|
};
|
|
58
63
|
}
|
|
@@ -71,6 +76,7 @@ export function CreateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscrimi
|
|
|
71
76
|
'instruction_path_part_id': value['instructionPathPartId'],
|
|
72
77
|
'approval_required': value['approvalRequired'],
|
|
73
78
|
'is_template': value['isTemplate'],
|
|
79
|
+
'selected_skill_ids': value['selectedSkillIds'],
|
|
74
80
|
'common_file_path_part_ids': value['commonFilePathPartIds'],
|
|
75
81
|
};
|
|
76
82
|
}
|
|
@@ -15,14 +15,15 @@ import type { DataSourceSchemaResponse } from './DataSourceSchemaResponse';
|
|
|
15
15
|
import type { DataSourceTableResponse } from './DataSourceTableResponse';
|
|
16
16
|
import type { DocumentResponse } from './DocumentResponse';
|
|
17
17
|
import type { FolderResponse } from './FolderResponse';
|
|
18
|
+
import type { SkillResponse } from './SkillResponse';
|
|
18
19
|
import type { WorkflowDefinitionResponse } from './WorkflowDefinitionResponse';
|
|
19
20
|
import type { WorkflowRunResponse } from './WorkflowRunResponse';
|
|
20
21
|
/**
|
|
21
|
-
* @type
|
|
22
|
+
* @type FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
|
|
22
23
|
*
|
|
23
24
|
* @export
|
|
24
25
|
*/
|
|
25
|
-
export type
|
|
26
|
+
export type FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR = {
|
|
26
27
|
partType: 'API_CONNECTION';
|
|
27
28
|
} & ApiConnectionResponse | {
|
|
28
29
|
partType: 'DATA_SOURCE';
|
|
@@ -35,11 +36,13 @@ export type FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkfl
|
|
|
35
36
|
} & DocumentResponse | {
|
|
36
37
|
partType: 'FOLDER';
|
|
37
38
|
} & FolderResponse | {
|
|
39
|
+
partType: 'SKILL';
|
|
40
|
+
} & SkillResponse | {
|
|
38
41
|
partType: 'WORKFLOW_DEFINITION';
|
|
39
42
|
} & WorkflowDefinitionResponse | {
|
|
40
43
|
partType: 'WORKFLOW_RUN';
|
|
41
44
|
} & WorkflowRunResponse;
|
|
42
|
-
export declare function
|
|
43
|
-
export declare function
|
|
44
|
-
export declare function
|
|
45
|
-
export declare function
|
|
45
|
+
export declare function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON(json: any): FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR;
|
|
46
|
+
export declare function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR;
|
|
47
|
+
export declare function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON(json: any): any;
|
|
48
|
+
export declare function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped(value?: FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -17,12 +17,13 @@ import { DataSourceSchemaResponseFromJSONTyped, DataSourceSchemaResponseToJSON,
|
|
|
17
17
|
import { DataSourceTableResponseFromJSONTyped, DataSourceTableResponseToJSON, } from './DataSourceTableResponse';
|
|
18
18
|
import { DocumentResponseFromJSONTyped, DocumentResponseToJSON, } from './DocumentResponse';
|
|
19
19
|
import { FolderResponseFromJSONTyped, FolderResponseToJSON, } from './FolderResponse';
|
|
20
|
+
import { SkillResponseFromJSONTyped, SkillResponseToJSON, } from './SkillResponse';
|
|
20
21
|
import { WorkflowDefinitionResponseFromJSONTyped, WorkflowDefinitionResponseToJSON, } from './WorkflowDefinitionResponse';
|
|
21
22
|
import { WorkflowRunResponseFromJSONTyped, WorkflowRunResponseToJSON, } from './WorkflowRunResponse';
|
|
22
|
-
export function
|
|
23
|
-
return
|
|
23
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON(json) {
|
|
24
|
+
return FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped(json, false);
|
|
24
25
|
}
|
|
25
|
-
export function
|
|
26
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
27
|
if (json == null) {
|
|
27
28
|
return json;
|
|
28
29
|
}
|
|
@@ -39,6 +40,8 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
39
40
|
return Object.assign({}, DocumentResponseFromJSONTyped(json, true), { partType: 'DOCUMENT' });
|
|
40
41
|
case 'FOLDER':
|
|
41
42
|
return Object.assign({}, FolderResponseFromJSONTyped(json, true), { partType: 'FOLDER' });
|
|
43
|
+
case 'SKILL':
|
|
44
|
+
return Object.assign({}, SkillResponseFromJSONTyped(json, true), { partType: 'SKILL' });
|
|
42
45
|
case 'WORKFLOW_DEFINITION':
|
|
43
46
|
return Object.assign({}, WorkflowDefinitionResponseFromJSONTyped(json, true), { partType: 'WORKFLOW_DEFINITION' });
|
|
44
47
|
case 'WORKFLOW_RUN':
|
|
@@ -47,10 +50,10 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
47
50
|
return json;
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
|
-
export function
|
|
51
|
-
return
|
|
53
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON(json) {
|
|
54
|
+
return FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped(json, false);
|
|
52
55
|
}
|
|
53
|
-
export function
|
|
56
|
+
export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
57
|
if (value == null) {
|
|
55
58
|
return value;
|
|
56
59
|
}
|
|
@@ -67,6 +70,8 @@ export function FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWo
|
|
|
67
70
|
return Object.assign({}, DocumentResponseToJSON(value), { partType: 'DOCUMENT' });
|
|
68
71
|
case 'FOLDER':
|
|
69
72
|
return Object.assign({}, FolderResponseToJSON(value), { partType: 'FOLDER' });
|
|
73
|
+
case 'SKILL':
|
|
74
|
+
return Object.assign({}, SkillResponseToJSON(value), { partType: 'SKILL' });
|
|
70
75
|
case 'WORKFLOW_DEFINITION':
|
|
71
76
|
return Object.assign({}, WorkflowDefinitionResponseToJSON(value), { partType: 'WORKFLOW_DEFINITION' });
|
|
72
77
|
case 'WORKFLOW_RUN':
|
|
@@ -9,39 +9,39 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
16
|
-
* @interface
|
|
16
|
+
* @interface PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
17
17
|
*/
|
|
18
|
-
export interface
|
|
18
|
+
export interface PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat {
|
|
19
19
|
/**
|
|
20
20
|
* List of items
|
|
21
|
-
* @type {Array<
|
|
22
|
-
* @memberof
|
|
21
|
+
* @type {Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>}
|
|
22
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
23
23
|
*/
|
|
24
|
-
items: Array<
|
|
24
|
+
items: Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>;
|
|
25
25
|
/**
|
|
26
26
|
* Total number of items
|
|
27
27
|
* @type {number}
|
|
28
|
-
* @memberof
|
|
28
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
29
29
|
*/
|
|
30
30
|
total: number;
|
|
31
31
|
/**
|
|
32
32
|
* Number of items per page
|
|
33
33
|
* @type {number}
|
|
34
|
-
* @memberof
|
|
34
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
35
35
|
*/
|
|
36
36
|
limit: number;
|
|
37
37
|
/**
|
|
38
38
|
* Number of items to skip
|
|
39
39
|
* @type {number}
|
|
40
|
-
* @memberof
|
|
40
|
+
* @memberof PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat
|
|
41
41
|
*/
|
|
42
42
|
offset: number;
|
|
43
43
|
}
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatPropertyValidationAttributesMap: {
|
|
45
45
|
[property: string]: {
|
|
46
46
|
maxLength?: number;
|
|
47
47
|
minLength?: number;
|
|
@@ -57,10 +57,10 @@ export declare const PaginatedResponseAnnotatedUnionFolderResponseDocumentRespon
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
* Check if a given object implements the
|
|
60
|
+
* Check if a given object implements the PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat interface.
|
|
61
61
|
*/
|
|
62
|
-
export declare function
|
|
63
|
-
export declare function
|
|
64
|
-
export declare function
|
|
65
|
-
export declare function
|
|
66
|
-
export declare function
|
|
62
|
+
export declare function instanceOfPaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat(value: object): value is PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat;
|
|
63
|
+
export declare function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSON(json: any): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat;
|
|
64
|
+
export declare function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat;
|
|
65
|
+
export declare function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSON(json: any): PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat;
|
|
66
|
+
export declare function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSONTyped(value?: PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
15
|
-
export const
|
|
14
|
+
import { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON, FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON, } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
15
|
+
export const PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatPropertyValidationAttributesMap = {
|
|
16
16
|
total: {
|
|
17
17
|
minimum: 0,
|
|
18
18
|
exclusiveMinimum: false,
|
|
@@ -27,9 +27,9 @@ export const PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkfl
|
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* Check if a given object implements the
|
|
30
|
+
* Check if a given object implements the PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat interface.
|
|
31
31
|
*/
|
|
32
|
-
export function
|
|
32
|
+
export function instanceOfPaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat(value) {
|
|
33
33
|
if (!('items' in value) || value['items'] === undefined)
|
|
34
34
|
return false;
|
|
35
35
|
if (!('total' in value) || value['total'] === undefined)
|
|
@@ -40,29 +40,29 @@ export function instanceOfPaginatedResponseAnnotatedUnionFolderResponseDocumentR
|
|
|
40
40
|
return false;
|
|
41
41
|
return true;
|
|
42
42
|
}
|
|
43
|
-
export function
|
|
44
|
-
return
|
|
43
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSON(json) {
|
|
44
|
+
return PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSONTyped(json, false);
|
|
45
45
|
}
|
|
46
|
-
export function
|
|
46
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
47
|
if (json == null) {
|
|
48
48
|
return json;
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
|
-
'items': (json['items'].map(
|
|
51
|
+
'items': (json['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON)),
|
|
52
52
|
'total': json['total'],
|
|
53
53
|
'limit': json['limit'],
|
|
54
54
|
'offset': json['offset'],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
export function
|
|
58
|
-
return
|
|
57
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSON(json) {
|
|
58
|
+
return PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSONTyped(json, false);
|
|
59
59
|
}
|
|
60
|
-
export function
|
|
60
|
+
export function PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
61
|
if (value == null) {
|
|
62
62
|
return value;
|
|
63
63
|
}
|
|
64
64
|
return {
|
|
65
|
-
'items': (value['items'].map(
|
|
65
|
+
'items': (value['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON)),
|
|
66
66
|
'total': value['total'],
|
|
67
67
|
'limit': value['limit'],
|
|
68
68
|
'offset': value['offset'],
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { SkillResponse } from './SkillResponse';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedResponseSkillResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedResponseSkillResponse {
|
|
19
|
+
/**
|
|
20
|
+
* List of items
|
|
21
|
+
* @type {Array<SkillResponse>}
|
|
22
|
+
* @memberof PaginatedResponseSkillResponse
|
|
23
|
+
*/
|
|
24
|
+
items: Array<SkillResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Total number of items
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof PaginatedResponseSkillResponse
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
* Number of items per page
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof PaginatedResponseSkillResponse
|
|
35
|
+
*/
|
|
36
|
+
limit: number;
|
|
37
|
+
/**
|
|
38
|
+
* Number of items to skip
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof PaginatedResponseSkillResponse
|
|
41
|
+
*/
|
|
42
|
+
offset: number;
|
|
43
|
+
}
|
|
44
|
+
export declare const PaginatedResponseSkillResponsePropertyValidationAttributesMap: {
|
|
45
|
+
[property: string]: {
|
|
46
|
+
maxLength?: number;
|
|
47
|
+
minLength?: number;
|
|
48
|
+
pattern?: string;
|
|
49
|
+
maximum?: number;
|
|
50
|
+
exclusiveMaximum?: boolean;
|
|
51
|
+
minimum?: number;
|
|
52
|
+
exclusiveMinimum?: boolean;
|
|
53
|
+
multipleOf?: number;
|
|
54
|
+
maxItems?: number;
|
|
55
|
+
minItems?: number;
|
|
56
|
+
uniqueItems?: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the PaginatedResponseSkillResponse interface.
|
|
61
|
+
*/
|
|
62
|
+
export declare function instanceOfPaginatedResponseSkillResponse(value: object): value is PaginatedResponseSkillResponse;
|
|
63
|
+
export declare function PaginatedResponseSkillResponseFromJSON(json: any): PaginatedResponseSkillResponse;
|
|
64
|
+
export declare function PaginatedResponseSkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseSkillResponse;
|
|
65
|
+
export declare function PaginatedResponseSkillResponseToJSON(json: any): PaginatedResponseSkillResponse;
|
|
66
|
+
export declare function PaginatedResponseSkillResponseToJSONTyped(value?: PaginatedResponseSkillResponse | null, ignoreDiscriminator?: boolean): any;
|