@knowledge-stack/ksapi 1.143.0 → 1.145.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 +6 -2
- package/README.md +6 -3
- package/dist/apis/PathPartsApi.d.ts +42 -1
- package/dist/apis/PathPartsApi.js +53 -0
- package/dist/apis/SkillsApi.d.ts +11 -8
- package/dist/apis/SkillsApi.js +7 -4
- package/dist/esm/apis/PathPartsApi.d.ts +42 -1
- package/dist/esm/apis/PathPartsApi.js +54 -1
- package/dist/esm/apis/SkillsApi.d.ts +11 -8
- package/dist/esm/apis/SkillsApi.js +7 -4
- package/dist/esm/models/CreateSkillRequest.d.ts +4 -4
- package/dist/esm/models/CreateSkillRequest.js +5 -5
- package/dist/esm/models/EventResponse.d.ts +35 -1
- package/dist/esm/models/EventResponse.js +12 -0
- package/dist/esm/models/{SkillScriptFile.d.ts → ReorderPathPartRequest.d.ts} +17 -17
- package/dist/esm/models/ReorderPathPartRequest.js +44 -0
- package/dist/esm/models/ResolvedRef.d.ts +79 -0
- package/dist/esm/models/ResolvedRef.js +59 -0
- package/dist/esm/models/SkillFile.d.ts +71 -0
- package/dist/esm/models/{SkillScriptFile.js → SkillFile.js} +23 -14
- package/dist/esm/models/SkillResponse.d.ts +6 -6
- package/dist/esm/models/SkillResponse.js +5 -5
- package/dist/esm/models/UpdateSkillRequest.d.ts +4 -4
- package/dist/esm/models/UpdateSkillRequest.js +5 -5
- package/dist/esm/models/index.d.ts +3 -1
- package/dist/esm/models/index.js +3 -1
- package/dist/models/CreateSkillRequest.d.ts +4 -4
- package/dist/models/CreateSkillRequest.js +5 -5
- package/dist/models/EventResponse.d.ts +35 -1
- package/dist/models/EventResponse.js +12 -0
- package/dist/models/{SkillScriptFile.d.ts → ReorderPathPartRequest.d.ts} +17 -17
- package/dist/models/ReorderPathPartRequest.js +52 -0
- package/dist/models/ResolvedRef.d.ts +79 -0
- package/dist/models/ResolvedRef.js +67 -0
- package/dist/models/SkillFile.d.ts +71 -0
- package/dist/models/{SkillScriptFile.js → SkillFile.js} +29 -20
- package/dist/models/SkillResponse.d.ts +6 -6
- package/dist/models/SkillResponse.js +5 -5
- package/dist/models/UpdateSkillRequest.d.ts +4 -4
- package/dist/models/UpdateSkillRequest.js +5 -5
- package/dist/models/index.d.ts +3 -1
- package/dist/models/index.js +3 -1
- package/docs/CreateSkillRequest.md +2 -2
- package/docs/EventResponse.md +11 -1
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +4 -4
- package/docs/PathPartsApi.md +79 -0
- package/docs/{SkillScriptFile.md → ReorderPathPartRequest.md} +9 -9
- package/docs/ResolvedRef.md +41 -0
- package/docs/SkillFile.md +39 -0
- package/docs/SkillResponse.md +4 -4
- package/docs/SkillsApi.md +6 -3
- package/docs/UpdateSkillRequest.md +2 -2
- package/package.json +1 -1
- package/src/apis/PathPartsApi.ts +99 -0
- package/src/apis/SkillsApi.ts +15 -8
- package/src/models/CreateSkillRequest.ts +13 -13
- package/src/models/EventResponse.ts +49 -1
- package/src/models/{SkillScriptFile.ts → ReorderPathPartRequest.ts} +23 -28
- package/src/models/ResolvedRef.ts +125 -0
- package/src/models/SkillFile.ts +118 -0
- package/src/models/SkillResponse.ts +15 -15
- package/src/models/UpdateSkillRequest.ts +13 -13
- package/src/models/index.ts +3 -1
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { SkillFileFromJSON, SkillFileToJSON, } from './SkillFile';
|
|
15
15
|
export const CreateSkillRequestPropertyValidationAttributesMap = {
|
|
16
16
|
name: {
|
|
17
17
|
maxLength: 255,
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
maxItems:
|
|
19
|
+
files: {
|
|
20
|
+
maxItems: 2000,
|
|
21
21
|
uniqueItems: false,
|
|
22
22
|
},
|
|
23
23
|
};
|
|
@@ -41,7 +41,7 @@ export function CreateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
return {
|
|
42
42
|
'name': json['name'],
|
|
43
43
|
'skillMd': json['skill_md'],
|
|
44
|
-
'
|
|
44
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFileFromJSON)),
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
export function CreateSkillRequestToJSON(json) {
|
|
@@ -54,6 +54,6 @@ export function CreateSkillRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
54
54
|
return {
|
|
55
55
|
'name': value['name'],
|
|
56
56
|
'skill_md': value['skillMd'],
|
|
57
|
-
'
|
|
57
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFileToJSON)),
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { UserInfo } from './UserInfo';
|
|
13
|
+
import type { ResolvedRef } from './ResolvedRef';
|
|
13
14
|
/**
|
|
14
15
|
* One event row, anchored to a path_part subject.
|
|
15
16
|
*
|
|
16
17
|
* ``kind`` is namespaced ``domain.action`` (e.g. ``workflow.approval``,
|
|
17
18
|
* ``document.created``). ``payload`` is the domain-specific structured
|
|
18
|
-
* JSON associated with the event
|
|
19
|
+
* JSON associated with the event, stored verbatim and never rewritten —
|
|
20
|
+
* the human-readable resolution lives alongside it in ``references``.
|
|
19
21
|
* @export
|
|
20
22
|
* @interface EventResponse
|
|
21
23
|
*/
|
|
@@ -64,6 +66,38 @@ export interface EventResponse {
|
|
|
64
66
|
* @memberof EventResponse
|
|
65
67
|
*/
|
|
66
68
|
actor?: UserInfo | null;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof EventResponse
|
|
73
|
+
*/
|
|
74
|
+
subjectName?: string | null;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @memberof EventResponse
|
|
79
|
+
*/
|
|
80
|
+
subjectPath?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof EventResponse
|
|
85
|
+
*/
|
|
86
|
+
subjectObjectId?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof EventResponse
|
|
91
|
+
*/
|
|
92
|
+
subjectPartType?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {{ [key: string]: ResolvedRef; }}
|
|
96
|
+
* @memberof EventResponse
|
|
97
|
+
*/
|
|
98
|
+
references?: {
|
|
99
|
+
[key: string]: ResolvedRef;
|
|
100
|
+
};
|
|
67
101
|
}
|
|
68
102
|
export declare const EventResponsePropertyValidationAttributesMap: {
|
|
69
103
|
[property: string]: {
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { mapValues } from '../runtime';
|
|
14
15
|
import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
|
|
16
|
+
import { ResolvedRefFromJSON, ResolvedRefToJSON, } from './ResolvedRef';
|
|
15
17
|
export const EventResponsePropertyValidationAttributesMap = {};
|
|
16
18
|
/**
|
|
17
19
|
* Check if a given object implements the EventResponse interface.
|
|
@@ -46,6 +48,11 @@ export function EventResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
48
|
'actorUserId': json['actor_user_id'],
|
|
47
49
|
'payload': json['payload'],
|
|
48
50
|
'actor': json['actor'] == null ? undefined : UserInfoFromJSON(json['actor']),
|
|
51
|
+
'subjectName': json['subject_name'] == null ? undefined : json['subject_name'],
|
|
52
|
+
'subjectPath': json['subject_path'] == null ? undefined : json['subject_path'],
|
|
53
|
+
'subjectObjectId': json['subject_object_id'] == null ? undefined : json['subject_object_id'],
|
|
54
|
+
'subjectPartType': json['subject_part_type'] == null ? undefined : json['subject_part_type'],
|
|
55
|
+
'references': json['references'] == null ? undefined : (mapValues(json['references'], ResolvedRefFromJSON)),
|
|
49
56
|
};
|
|
50
57
|
}
|
|
51
58
|
export function EventResponseToJSON(json) {
|
|
@@ -63,5 +70,10 @@ export function EventResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
63
70
|
'actor_user_id': value['actorUserId'],
|
|
64
71
|
'payload': value['payload'],
|
|
65
72
|
'actor': UserInfoToJSON(value['actor']),
|
|
73
|
+
'subject_name': value['subjectName'],
|
|
74
|
+
'subject_path': value['subjectPath'],
|
|
75
|
+
'subject_object_id': value['subjectObjectId'],
|
|
76
|
+
'subject_part_type': value['subjectPartType'],
|
|
77
|
+
'references': value['references'] == null ? undefined : (mapValues(value['references'], ResolvedRefToJSON)),
|
|
66
78
|
};
|
|
67
79
|
}
|
|
@@ -10,25 +10,25 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Reorder a path part within its sibling list.
|
|
14
14
|
* @export
|
|
15
|
-
* @interface
|
|
15
|
+
* @interface ReorderPathPartRequest
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface ReorderPathPartRequest {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Place this node immediately after the given sibling PathPart id (must share the same parent). Pass the current tail's id to move to the end. Requires move_to_head=false.
|
|
20
20
|
* @type {string}
|
|
21
|
-
* @memberof
|
|
21
|
+
* @memberof ReorderPathPartRequest
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
prevSiblingPathId?: string | null;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {
|
|
27
|
-
* @memberof
|
|
25
|
+
* Move this node to the head of its sibling list.
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof ReorderPathPartRequest
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
moveToHead?: boolean;
|
|
30
30
|
}
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const ReorderPathPartRequestPropertyValidationAttributesMap: {
|
|
32
32
|
[property: string]: {
|
|
33
33
|
maxLength?: number;
|
|
34
34
|
minLength?: number;
|
|
@@ -44,10 +44,10 @@ export declare const SkillScriptFilePropertyValidationAttributesMap: {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
* Check if a given object implements the
|
|
47
|
+
* Check if a given object implements the ReorderPathPartRequest interface.
|
|
48
48
|
*/
|
|
49
|
-
export declare function
|
|
50
|
-
export declare function
|
|
51
|
-
export declare function
|
|
52
|
-
export declare function
|
|
53
|
-
export declare function
|
|
49
|
+
export declare function instanceOfReorderPathPartRequest(value: object): value is ReorderPathPartRequest;
|
|
50
|
+
export declare function ReorderPathPartRequestFromJSON(json: any): ReorderPathPartRequest;
|
|
51
|
+
export declare function ReorderPathPartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReorderPathPartRequest;
|
|
52
|
+
export declare function ReorderPathPartRequestToJSON(json: any): ReorderPathPartRequest;
|
|
53
|
+
export declare function ReorderPathPartRequestToJSONTyped(value?: ReorderPathPartRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export const ReorderPathPartRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ReorderPathPartRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfReorderPathPartRequest(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function ReorderPathPartRequestFromJSON(json) {
|
|
22
|
+
return ReorderPathPartRequestFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function ReorderPathPartRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
|
|
30
|
+
'moveToHead': json['move_to_head'] == null ? undefined : json['move_to_head'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function ReorderPathPartRequestToJSON(json) {
|
|
34
|
+
return ReorderPathPartRequestToJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function ReorderPathPartRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'prev_sibling_path_id': value['prevSiblingPathId'],
|
|
42
|
+
'move_to_head': value['moveToHead'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One id resolved to a human-readable, linkable entity.
|
|
14
|
+
*
|
|
15
|
+
* Every UUID that appears in an event (its subject, its actor, and any id
|
|
16
|
+
* inside the payload) resolves to one of these so the frontend can render a
|
|
17
|
+
* name and a link instead of a bare UUID. ``object_id`` is what the frontend
|
|
18
|
+
* routes on: a PDO id for a path_part (never the internal path_part_id), or
|
|
19
|
+
* the user id for a user.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface ResolvedRef
|
|
22
|
+
*/
|
|
23
|
+
export interface ResolvedRef {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {ResolvedRefEntityTypeEnum}
|
|
27
|
+
* @memberof ResolvedRef
|
|
28
|
+
*/
|
|
29
|
+
entityType: ResolvedRefEntityTypeEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ResolvedRef
|
|
34
|
+
*/
|
|
35
|
+
objectId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ResolvedRef
|
|
40
|
+
*/
|
|
41
|
+
displayName?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ResolvedRef
|
|
46
|
+
*/
|
|
47
|
+
partType?: string | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const ResolvedRefEntityTypeEnum: {
|
|
53
|
+
readonly PathPart: 'path_part';
|
|
54
|
+
readonly User: 'user';
|
|
55
|
+
};
|
|
56
|
+
export type ResolvedRefEntityTypeEnum = typeof ResolvedRefEntityTypeEnum[keyof typeof ResolvedRefEntityTypeEnum];
|
|
57
|
+
export declare const ResolvedRefPropertyValidationAttributesMap: {
|
|
58
|
+
[property: string]: {
|
|
59
|
+
maxLength?: number;
|
|
60
|
+
minLength?: number;
|
|
61
|
+
pattern?: string;
|
|
62
|
+
maximum?: number;
|
|
63
|
+
exclusiveMaximum?: boolean;
|
|
64
|
+
minimum?: number;
|
|
65
|
+
exclusiveMinimum?: boolean;
|
|
66
|
+
multipleOf?: number;
|
|
67
|
+
maxItems?: number;
|
|
68
|
+
minItems?: number;
|
|
69
|
+
uniqueItems?: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the ResolvedRef interface.
|
|
74
|
+
*/
|
|
75
|
+
export declare function instanceOfResolvedRef(value: object): value is ResolvedRef;
|
|
76
|
+
export declare function ResolvedRefFromJSON(json: any): ResolvedRef;
|
|
77
|
+
export declare function ResolvedRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResolvedRef;
|
|
78
|
+
export declare function ResolvedRefToJSON(json: any): ResolvedRef;
|
|
79
|
+
export declare function ResolvedRefToJSONTyped(value?: ResolvedRef | 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
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const ResolvedRefEntityTypeEnum = {
|
|
18
|
+
PathPart: 'path_part',
|
|
19
|
+
User: 'user'
|
|
20
|
+
};
|
|
21
|
+
export const ResolvedRefPropertyValidationAttributesMap = {};
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ResolvedRef interface.
|
|
24
|
+
*/
|
|
25
|
+
export function instanceOfResolvedRef(value) {
|
|
26
|
+
if (!('entityType' in value) || value['entityType'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('objectId' in value) || value['objectId'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function ResolvedRefFromJSON(json) {
|
|
33
|
+
return ResolvedRefFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ResolvedRefFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'entityType': json['entity_type'],
|
|
41
|
+
'objectId': json['object_id'],
|
|
42
|
+
'displayName': json['display_name'] == null ? undefined : json['display_name'],
|
|
43
|
+
'partType': json['part_type'] == null ? undefined : json['part_type'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function ResolvedRefToJSON(json) {
|
|
47
|
+
return ResolvedRefToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function ResolvedRefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'entity_type': value['entityType'],
|
|
55
|
+
'object_id': value['objectId'],
|
|
56
|
+
'display_name': value['displayName'],
|
|
57
|
+
'part_type': value['partType'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One file in a skill bundle, at a path relative to the skill root.
|
|
14
|
+
*
|
|
15
|
+
* Skills carry arbitrary trees (``scripts/office/validate.py``,
|
|
16
|
+
* ``references/guide.md``, ``assets/logo.png``), so binary files are carried
|
|
17
|
+
* base64-encoded rather than excluded.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SkillFile
|
|
20
|
+
*/
|
|
21
|
+
export interface SkillFile {
|
|
22
|
+
/**
|
|
23
|
+
* Path relative to the skill root, e.g. scripts/office/run.py
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SkillFile
|
|
26
|
+
*/
|
|
27
|
+
path: string;
|
|
28
|
+
/**
|
|
29
|
+
* UTF-8 text, or base64-encoded bytes when encoding=base64.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SkillFile
|
|
32
|
+
*/
|
|
33
|
+
content: string;
|
|
34
|
+
/**
|
|
35
|
+
* How `content` is encoded.
|
|
36
|
+
* @type {SkillFileEncodingEnum}
|
|
37
|
+
* @memberof SkillFile
|
|
38
|
+
*/
|
|
39
|
+
encoding?: SkillFileEncodingEnum;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const SkillFileEncodingEnum: {
|
|
45
|
+
readonly Utf8: 'utf-8';
|
|
46
|
+
readonly Base64: 'base64';
|
|
47
|
+
};
|
|
48
|
+
export type SkillFileEncodingEnum = typeof SkillFileEncodingEnum[keyof typeof SkillFileEncodingEnum];
|
|
49
|
+
export declare const SkillFilePropertyValidationAttributesMap: {
|
|
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
|
+
/**
|
|
65
|
+
* Check if a given object implements the SkillFile interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfSkillFile(value: object): value is SkillFile;
|
|
68
|
+
export declare function SkillFileFromJSON(json: any): SkillFile;
|
|
69
|
+
export declare function SkillFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFile;
|
|
70
|
+
export declare function SkillFileToJSON(json: any): SkillFile;
|
|
71
|
+
export declare function SkillFileToJSONTyped(value?: SkillFile | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,42 +11,51 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const SkillFileEncodingEnum = {
|
|
18
|
+
Utf8: 'utf-8',
|
|
19
|
+
Base64: 'base64'
|
|
20
|
+
};
|
|
21
|
+
export const SkillFilePropertyValidationAttributesMap = {
|
|
22
|
+
path: {
|
|
23
|
+
maxLength: 1024,
|
|
17
24
|
},
|
|
18
25
|
};
|
|
19
26
|
/**
|
|
20
|
-
* Check if a given object implements the
|
|
27
|
+
* Check if a given object implements the SkillFile interface.
|
|
21
28
|
*/
|
|
22
|
-
export function
|
|
23
|
-
if (!('
|
|
29
|
+
export function instanceOfSkillFile(value) {
|
|
30
|
+
if (!('path' in value) || value['path'] === undefined)
|
|
24
31
|
return false;
|
|
25
32
|
if (!('content' in value) || value['content'] === undefined)
|
|
26
33
|
return false;
|
|
27
34
|
return true;
|
|
28
35
|
}
|
|
29
|
-
export function
|
|
30
|
-
return
|
|
36
|
+
export function SkillFileFromJSON(json) {
|
|
37
|
+
return SkillFileFromJSONTyped(json, false);
|
|
31
38
|
}
|
|
32
|
-
export function
|
|
39
|
+
export function SkillFileFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
40
|
if (json == null) {
|
|
34
41
|
return json;
|
|
35
42
|
}
|
|
36
43
|
return {
|
|
37
|
-
'
|
|
44
|
+
'path': json['path'],
|
|
38
45
|
'content': json['content'],
|
|
46
|
+
'encoding': json['encoding'] == null ? undefined : json['encoding'],
|
|
39
47
|
};
|
|
40
48
|
}
|
|
41
|
-
export function
|
|
42
|
-
return
|
|
49
|
+
export function SkillFileToJSON(json) {
|
|
50
|
+
return SkillFileToJSONTyped(json, false);
|
|
43
51
|
}
|
|
44
|
-
export function
|
|
52
|
+
export function SkillFileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
53
|
if (value == null) {
|
|
46
54
|
return value;
|
|
47
55
|
}
|
|
48
56
|
return {
|
|
49
|
-
'
|
|
57
|
+
'path': value['path'],
|
|
50
58
|
'content': value['content'],
|
|
59
|
+
'encoding': value['encoding'],
|
|
51
60
|
};
|
|
52
61
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ItemPermissions } from './ItemPermissions';
|
|
13
|
-
import type {
|
|
13
|
+
import type { SkillFile } from './SkillFile';
|
|
14
14
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
15
15
|
import type { UserInfo } from './UserInfo';
|
|
16
16
|
/**
|
|
@@ -74,17 +74,17 @@ export interface SkillResponse {
|
|
|
74
74
|
*/
|
|
75
75
|
skillMd?: string | null;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Bundle file paths relative to the skill root (SKILL.md excluded); populated on the detail read and on mutation responses, empty on list.
|
|
78
78
|
* @type {Array<string>}
|
|
79
79
|
* @memberof SkillResponse
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
filePaths?: Array<string>;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {Array<
|
|
83
|
+
* Bundle files with their contents; populated only on the detail read (GET /skills/{id}), null on list. Lets the editor read the current file set so a PATCH can safely resubmit the whole set.
|
|
84
|
+
* @type {Array<SkillFile>}
|
|
85
85
|
* @memberof SkillResponse
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
files?: Array<SkillFile> | null;
|
|
88
88
|
/**
|
|
89
89
|
* Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
|
|
90
90
|
* @type {boolean}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
|
|
15
|
-
import {
|
|
15
|
+
import { SkillFileFromJSON, SkillFileToJSON, } from './SkillFile';
|
|
16
16
|
import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
|
|
17
17
|
import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
|
|
18
18
|
/**
|
|
@@ -65,8 +65,8 @@ export function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
65
65
|
'name': json['name'],
|
|
66
66
|
'description': json['description'],
|
|
67
67
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
68
|
-
'
|
|
69
|
-
'
|
|
68
|
+
'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
|
|
69
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFileFromJSON)),
|
|
70
70
|
'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
|
|
71
71
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
72
72
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
@@ -92,8 +92,8 @@ export function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
92
92
|
'name': value['name'],
|
|
93
93
|
'description': value['description'],
|
|
94
94
|
'skill_md': value['skillMd'],
|
|
95
|
-
'
|
|
96
|
-
'
|
|
95
|
+
'file_paths': value['filePaths'],
|
|
96
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFileToJSON)),
|
|
97
97
|
'has_unpublished_changes': value['hasUnpublishedChanges'],
|
|
98
98
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
99
99
|
'owner': UserInfoToJSON(value['owner']),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { SkillFile } from './SkillFile';
|
|
13
13
|
/**
|
|
14
14
|
* Edit working-copy files in place (does NOT cut a version).
|
|
15
15
|
* @export
|
|
@@ -23,11 +23,11 @@ export interface UpdateSkillRequest {
|
|
|
23
23
|
*/
|
|
24
24
|
skillMd?: string | null;
|
|
25
25
|
/**
|
|
26
|
-
* Replace the
|
|
27
|
-
* @type {Array<
|
|
26
|
+
* Replace the whole bundle below SKILL.md (add/overwrite/remove to match); null leaves the tree unchanged, [] removes every file.
|
|
27
|
+
* @type {Array<SkillFile>}
|
|
28
28
|
* @memberof UpdateSkillRequest
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
files?: Array<SkillFile> | null;
|
|
31
31
|
}
|
|
32
32
|
export declare const UpdateSkillRequestPropertyValidationAttributesMap: {
|
|
33
33
|
[property: string]: {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { SkillFileFromJSON, SkillFileToJSON, } from './SkillFile';
|
|
15
15
|
export const UpdateSkillRequestPropertyValidationAttributesMap = {
|
|
16
|
-
|
|
17
|
-
maxItems:
|
|
16
|
+
files: {
|
|
17
|
+
maxItems: 2000,
|
|
18
18
|
uniqueItems: false,
|
|
19
19
|
},
|
|
20
20
|
};
|
|
@@ -33,7 +33,7 @@ export function UpdateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
35
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
36
|
-
'
|
|
36
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFileFromJSON)),
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export function UpdateSkillRequestToJSON(json) {
|
|
@@ -45,6 +45,6 @@ export function UpdateSkillRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
45
45
|
}
|
|
46
46
|
return {
|
|
47
47
|
'skill_md': value['skillMd'],
|
|
48
|
-
'
|
|
48
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFileToJSON)),
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -225,7 +225,9 @@ export * from './ProposeMemoryChunkRequest';
|
|
|
225
225
|
export * from './ProposedMemoryChunkResponse';
|
|
226
226
|
export * from './ReasoningPart';
|
|
227
227
|
export * from './ReferenceType';
|
|
228
|
+
export * from './ReorderPathPartRequest';
|
|
228
229
|
export * from './RequestPhoneChangeRequest';
|
|
230
|
+
export * from './ResolvedRef';
|
|
229
231
|
export * from './ResolvedReferenceInput';
|
|
230
232
|
export * from './ResolvedReferenceOutput';
|
|
231
233
|
export * from './ResponseSendPwResetEmail';
|
|
@@ -253,9 +255,9 @@ export * from './SetApprovalStateRequest';
|
|
|
253
255
|
export * from './SetWorkflowRunApprovalRequest';
|
|
254
256
|
export * from './SheetVisibilityChange';
|
|
255
257
|
export * from './SignInRequest';
|
|
258
|
+
export * from './SkillFile';
|
|
256
259
|
export * from './SkillOrder';
|
|
257
260
|
export * from './SkillResponse';
|
|
258
|
-
export * from './SkillScriptFile';
|
|
259
261
|
export * from './SkillSearchResult';
|
|
260
262
|
export * from './SkillVersionResponse';
|
|
261
263
|
export * from './SortDirection';
|