@knowledge-stack/ksapi 1.135.1 → 1.136.1
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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Semantic skill discovery for the agent.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SearchSkillsRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchSkillsRequest {
|
|
22
|
+
/**
|
|
23
|
+
* What the agent needs a skill for.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SearchSkillsRequest
|
|
26
|
+
*/
|
|
27
|
+
query: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SearchSkillsRequest
|
|
32
|
+
*/
|
|
33
|
+
topK?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SearchSkillsRequest
|
|
38
|
+
*/
|
|
39
|
+
scoreThreshold?: number;
|
|
40
|
+
}
|
|
41
|
+
export const SearchSkillsRequestPropertyValidationAttributesMap: {
|
|
42
|
+
[property: string]: {
|
|
43
|
+
maxLength?: number,
|
|
44
|
+
minLength?: number,
|
|
45
|
+
pattern?: string,
|
|
46
|
+
maximum?: number,
|
|
47
|
+
exclusiveMaximum?: boolean,
|
|
48
|
+
minimum?: number,
|
|
49
|
+
exclusiveMinimum?: boolean,
|
|
50
|
+
multipleOf?: number,
|
|
51
|
+
maxItems?: number,
|
|
52
|
+
minItems?: number,
|
|
53
|
+
uniqueItems?: boolean
|
|
54
|
+
}
|
|
55
|
+
} = {
|
|
56
|
+
query: {
|
|
57
|
+
minLength: 1,
|
|
58
|
+
},
|
|
59
|
+
topK: {
|
|
60
|
+
maximum: 50,
|
|
61
|
+
exclusiveMaximum: false,
|
|
62
|
+
minimum: 1,
|
|
63
|
+
exclusiveMinimum: false,
|
|
64
|
+
},
|
|
65
|
+
scoreThreshold: {
|
|
66
|
+
maximum: 1.0,
|
|
67
|
+
exclusiveMaximum: false,
|
|
68
|
+
minimum: 0.0,
|
|
69
|
+
exclusiveMinimum: false,
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Check if a given object implements the SearchSkillsRequest interface.
|
|
76
|
+
*/
|
|
77
|
+
export function instanceOfSearchSkillsRequest(value: object): value is SearchSkillsRequest {
|
|
78
|
+
if (!('query' in value) || value['query'] === undefined) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function SearchSkillsRequestFromJSON(json: any): SearchSkillsRequest {
|
|
83
|
+
return SearchSkillsRequestFromJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function SearchSkillsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchSkillsRequest {
|
|
87
|
+
if (json == null) {
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'query': json['query'],
|
|
93
|
+
'topK': json['top_k'] == null ? undefined : json['top_k'],
|
|
94
|
+
'scoreThreshold': json['score_threshold'] == null ? undefined : json['score_threshold'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function SearchSkillsRequestToJSON(json: any): SearchSkillsRequest {
|
|
99
|
+
return SearchSkillsRequestToJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function SearchSkillsRequestToJSONTyped(value?: SearchSkillsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
103
|
+
if (value == null) {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'query': value['query'],
|
|
110
|
+
'top_k': value['topK'],
|
|
111
|
+
'score_threshold': value['scoreThreshold'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { SkillSearchResult } from './SkillSearchResult';
|
|
17
|
+
import {
|
|
18
|
+
SkillSearchResultFromJSON,
|
|
19
|
+
SkillSearchResultFromJSONTyped,
|
|
20
|
+
SkillSearchResultToJSON,
|
|
21
|
+
SkillSearchResultToJSONTyped,
|
|
22
|
+
} from './SkillSearchResult';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface SearchSkillsResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface SearchSkillsResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<SkillSearchResult>}
|
|
33
|
+
* @memberof SearchSkillsResponse
|
|
34
|
+
*/
|
|
35
|
+
results?: Array<SkillSearchResult>;
|
|
36
|
+
}
|
|
37
|
+
export const SearchSkillsResponsePropertyValidationAttributesMap: {
|
|
38
|
+
[property: string]: {
|
|
39
|
+
maxLength?: number,
|
|
40
|
+
minLength?: number,
|
|
41
|
+
pattern?: string,
|
|
42
|
+
maximum?: number,
|
|
43
|
+
exclusiveMaximum?: boolean,
|
|
44
|
+
minimum?: number,
|
|
45
|
+
exclusiveMinimum?: boolean,
|
|
46
|
+
multipleOf?: number,
|
|
47
|
+
maxItems?: number,
|
|
48
|
+
minItems?: number,
|
|
49
|
+
uniqueItems?: boolean
|
|
50
|
+
}
|
|
51
|
+
} = {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the SearchSkillsResponse interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfSearchSkillsResponse(value: object): value is SearchSkillsResponse {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SearchSkillsResponseFromJSON(json: any): SearchSkillsResponse {
|
|
63
|
+
return SearchSkillsResponseFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SearchSkillsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchSkillsResponse {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'results': json['results'] == null ? undefined : ((json['results'] as Array<any>).map(SkillSearchResultFromJSON)),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function SearchSkillsResponseToJSON(json: any): SearchSkillsResponse {
|
|
77
|
+
return SearchSkillsResponseToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SearchSkillsResponseToJSONTyped(value?: SearchSkillsResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'results': value['results'] == null ? undefined : ((value['results'] as Array<any>).map(SkillSearchResultToJSON)),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sort fields for the skill list (sidebar/browse).
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const SkillOrder = {
|
|
21
|
+
Name: 'NAME',
|
|
22
|
+
CreatedAt: 'CREATED_AT',
|
|
23
|
+
UpdatedAt: 'UPDATED_AT'
|
|
24
|
+
} as const;
|
|
25
|
+
export type SkillOrder = typeof SkillOrder[keyof typeof SkillOrder];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfSkillOrder(value: any): boolean {
|
|
29
|
+
for (const key in SkillOrder) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(SkillOrder, key)) {
|
|
31
|
+
if (SkillOrder[key as keyof typeof SkillOrder] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function SkillOrderFromJSON(json: any): SkillOrder {
|
|
40
|
+
return SkillOrderFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function SkillOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillOrder {
|
|
44
|
+
return json as SkillOrder;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function SkillOrderToJSON(value?: SkillOrder | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SkillOrderToJSONTyped(value: any, ignoreDiscriminator: boolean): SkillOrder {
|
|
52
|
+
return value as SkillOrder;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ItemPermissions } from './ItemPermissions';
|
|
17
|
+
import {
|
|
18
|
+
ItemPermissionsFromJSON,
|
|
19
|
+
ItemPermissionsFromJSONTyped,
|
|
20
|
+
ItemPermissionsToJSON,
|
|
21
|
+
ItemPermissionsToJSONTyped,
|
|
22
|
+
} from './ItemPermissions';
|
|
23
|
+
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
24
|
+
import {
|
|
25
|
+
PathPartApprovalStateFromJSON,
|
|
26
|
+
PathPartApprovalStateFromJSONTyped,
|
|
27
|
+
PathPartApprovalStateToJSON,
|
|
28
|
+
PathPartApprovalStateToJSONTyped,
|
|
29
|
+
} from './PathPartApprovalState';
|
|
30
|
+
import type { UserInfo } from './UserInfo';
|
|
31
|
+
import {
|
|
32
|
+
UserInfoFromJSON,
|
|
33
|
+
UserInfoFromJSONTyped,
|
|
34
|
+
UserInfoToJSON,
|
|
35
|
+
UserInfoToJSONTyped,
|
|
36
|
+
} from './UserInfo';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Skill response; ``part_type`` is the folder-listing discriminator.
|
|
40
|
+
* @export
|
|
41
|
+
* @interface SkillResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface SkillResponse {
|
|
44
|
+
/**
|
|
45
|
+
* Path part type
|
|
46
|
+
* @type {SkillResponsePartTypeEnum}
|
|
47
|
+
* @memberof SkillResponse
|
|
48
|
+
*/
|
|
49
|
+
partType?: SkillResponsePartTypeEnum;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof SkillResponse
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
/**
|
|
57
|
+
* SKILL path_part of this skill
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof SkillResponse
|
|
60
|
+
*/
|
|
61
|
+
pathPartId: string;
|
|
62
|
+
/**
|
|
63
|
+
* FOLDER path_part of the containing folder
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof SkillResponse
|
|
66
|
+
*/
|
|
67
|
+
parentPathPartId: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Full materialized path from root
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof SkillResponse
|
|
72
|
+
*/
|
|
73
|
+
materializedPath: string;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof SkillResponse
|
|
78
|
+
*/
|
|
79
|
+
tenantId: string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof SkillResponse
|
|
84
|
+
*/
|
|
85
|
+
name: string;
|
|
86
|
+
/**
|
|
87
|
+
* One-line 'use when…' routing signal, from the SKILL.md frontmatter.
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof SkillResponse
|
|
90
|
+
*/
|
|
91
|
+
description: string;
|
|
92
|
+
/**
|
|
93
|
+
* Full SKILL.md content; populated on detail reads, null on list.
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof SkillResponse
|
|
96
|
+
*/
|
|
97
|
+
skillMd?: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* Bundled script file names; populated on detail reads.
|
|
100
|
+
* @type {Array<string>}
|
|
101
|
+
* @memberof SkillResponse
|
|
102
|
+
*/
|
|
103
|
+
scriptNames?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
* @memberof SkillResponse
|
|
108
|
+
*/
|
|
109
|
+
hasUnpublishedChanges?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @type {PathPartApprovalState}
|
|
113
|
+
* @memberof SkillResponse
|
|
114
|
+
*/
|
|
115
|
+
approvalState: PathPartApprovalState;
|
|
116
|
+
/**
|
|
117
|
+
* Creator, or null.
|
|
118
|
+
* @type {UserInfo}
|
|
119
|
+
* @memberof SkillResponse
|
|
120
|
+
*/
|
|
121
|
+
owner?: UserInfo | null;
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @type {Date}
|
|
125
|
+
* @memberof SkillResponse
|
|
126
|
+
*/
|
|
127
|
+
createdAt: Date;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @type {Date}
|
|
131
|
+
* @memberof SkillResponse
|
|
132
|
+
*/
|
|
133
|
+
updatedAt: Date;
|
|
134
|
+
/**
|
|
135
|
+
* Caller's effective rights; null on mutation responses.
|
|
136
|
+
* @type {ItemPermissions}
|
|
137
|
+
* @memberof SkillResponse
|
|
138
|
+
*/
|
|
139
|
+
permissions?: ItemPermissions | null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @export
|
|
145
|
+
*/
|
|
146
|
+
export const SkillResponsePartTypeEnum = {
|
|
147
|
+
Skill: 'SKILL'
|
|
148
|
+
} as const;
|
|
149
|
+
export type SkillResponsePartTypeEnum = typeof SkillResponsePartTypeEnum[keyof typeof SkillResponsePartTypeEnum];
|
|
150
|
+
|
|
151
|
+
export const SkillResponsePropertyValidationAttributesMap: {
|
|
152
|
+
[property: string]: {
|
|
153
|
+
maxLength?: number,
|
|
154
|
+
minLength?: number,
|
|
155
|
+
pattern?: string,
|
|
156
|
+
maximum?: number,
|
|
157
|
+
exclusiveMaximum?: boolean,
|
|
158
|
+
minimum?: number,
|
|
159
|
+
exclusiveMinimum?: boolean,
|
|
160
|
+
multipleOf?: number,
|
|
161
|
+
maxItems?: number,
|
|
162
|
+
minItems?: number,
|
|
163
|
+
uniqueItems?: boolean
|
|
164
|
+
}
|
|
165
|
+
} = {
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Check if a given object implements the SkillResponse interface.
|
|
171
|
+
*/
|
|
172
|
+
export function instanceOfSkillResponse(value: object): value is SkillResponse {
|
|
173
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
174
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
175
|
+
if (!('parentPathPartId' in value) || value['parentPathPartId'] === undefined) return false;
|
|
176
|
+
if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
|
|
177
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
178
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
179
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
180
|
+
if (!('approvalState' in value) || value['approvalState'] === undefined) return false;
|
|
181
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
182
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function SkillResponseFromJSON(json: any): SkillResponse {
|
|
187
|
+
return SkillResponseFromJSONTyped(json, false);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function SkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillResponse {
|
|
191
|
+
if (json == null) {
|
|
192
|
+
return json;
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
|
|
196
|
+
'partType': json['part_type'] == null ? undefined : json['part_type'],
|
|
197
|
+
'id': json['id'],
|
|
198
|
+
'pathPartId': json['path_part_id'],
|
|
199
|
+
'parentPathPartId': json['parent_path_part_id'],
|
|
200
|
+
'materializedPath': json['materialized_path'],
|
|
201
|
+
'tenantId': json['tenant_id'],
|
|
202
|
+
'name': json['name'],
|
|
203
|
+
'description': json['description'],
|
|
204
|
+
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
205
|
+
'scriptNames': json['script_names'] == null ? undefined : json['script_names'],
|
|
206
|
+
'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
|
|
207
|
+
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
208
|
+
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
209
|
+
'createdAt': (new Date(json['created_at'])),
|
|
210
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
211
|
+
'permissions': json['permissions'] == null ? undefined : ItemPermissionsFromJSON(json['permissions']),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function SkillResponseToJSON(json: any): SkillResponse {
|
|
216
|
+
return SkillResponseToJSONTyped(json, false);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function SkillResponseToJSONTyped(value?: SkillResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
220
|
+
if (value == null) {
|
|
221
|
+
return value;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return {
|
|
225
|
+
|
|
226
|
+
'part_type': value['partType'],
|
|
227
|
+
'id': value['id'],
|
|
228
|
+
'path_part_id': value['pathPartId'],
|
|
229
|
+
'parent_path_part_id': value['parentPathPartId'],
|
|
230
|
+
'materialized_path': value['materializedPath'],
|
|
231
|
+
'tenant_id': value['tenantId'],
|
|
232
|
+
'name': value['name'],
|
|
233
|
+
'description': value['description'],
|
|
234
|
+
'skill_md': value['skillMd'],
|
|
235
|
+
'script_names': value['scriptNames'],
|
|
236
|
+
'has_unpublished_changes': value['hasUnpublishedChanges'],
|
|
237
|
+
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
238
|
+
'owner': UserInfoToJSON(value['owner']),
|
|
239
|
+
'created_at': value['createdAt'].toISOString(),
|
|
240
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
241
|
+
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A single script bundled under a skill's ``scripts/`` folder.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SkillScriptFile
|
|
20
|
+
*/
|
|
21
|
+
export interface SkillScriptFile {
|
|
22
|
+
/**
|
|
23
|
+
* Script file name, e.g. inspect.py
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SkillScriptFile
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Script file contents (UTF-8 text).
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SkillScriptFile
|
|
32
|
+
*/
|
|
33
|
+
content: string;
|
|
34
|
+
}
|
|
35
|
+
export const SkillScriptFilePropertyValidationAttributesMap: {
|
|
36
|
+
[property: string]: {
|
|
37
|
+
maxLength?: number,
|
|
38
|
+
minLength?: number,
|
|
39
|
+
pattern?: string,
|
|
40
|
+
maximum?: number,
|
|
41
|
+
exclusiveMaximum?: boolean,
|
|
42
|
+
minimum?: number,
|
|
43
|
+
exclusiveMinimum?: boolean,
|
|
44
|
+
multipleOf?: number,
|
|
45
|
+
maxItems?: number,
|
|
46
|
+
minItems?: number,
|
|
47
|
+
uniqueItems?: boolean
|
|
48
|
+
}
|
|
49
|
+
} = {
|
|
50
|
+
name: {
|
|
51
|
+
maxLength: 255,
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the SkillScriptFile interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfSkillScriptFile(value: object): value is SkillScriptFile {
|
|
60
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
61
|
+
if (!('content' in value) || value['content'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function SkillScriptFileFromJSON(json: any): SkillScriptFile {
|
|
66
|
+
return SkillScriptFileFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function SkillScriptFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillScriptFile {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'name': json['name'],
|
|
76
|
+
'content': json['content'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function SkillScriptFileToJSON(json: any): SkillScriptFile {
|
|
81
|
+
return SkillScriptFileToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function SkillScriptFileToJSONTyped(value?: SkillScriptFile | null, ignoreDiscriminator: boolean = false): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'name': value['name'],
|
|
92
|
+
'content': value['content'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|