@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.
Files changed (144) hide show
  1. package/.openapi-generator/FILES +28 -4
  2. package/README.md +29 -4
  3. package/dist/apis/FoldersApi.d.ts +9 -9
  4. package/dist/apis/FoldersApi.js +2 -2
  5. package/dist/apis/SkillsApi.d.ts +579 -0
  6. package/dist/apis/SkillsApi.js +786 -0
  7. package/dist/apis/WorkflowDefinitionsApi.d.ts +3 -0
  8. package/dist/apis/WorkflowDefinitionsApi.js +3 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/FoldersApi.d.ts +9 -9
  12. package/dist/esm/apis/FoldersApi.js +3 -3
  13. package/dist/esm/apis/SkillsApi.d.ts +579 -0
  14. package/dist/esm/apis/SkillsApi.js +749 -0
  15. package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +3 -0
  16. package/dist/esm/apis/WorkflowDefinitionsApi.js +3 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/ActivateSkillVersionRequest.d.ts +47 -0
  20. package/dist/esm/models/ActivateSkillVersionRequest.js +42 -0
  21. package/dist/esm/models/CreateSkillRequest.d.ts +60 -0
  22. package/dist/esm/models/CreateSkillRequest.js +59 -0
  23. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  24. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +6 -0
  25. package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
  26. package/dist/esm/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +11 -6
  27. package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
  28. package/dist/esm/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +12 -12
  29. package/dist/esm/models/PaginatedResponseSkillResponse.d.ts +66 -0
  30. package/dist/esm/models/PaginatedResponseSkillResponse.js +70 -0
  31. package/dist/esm/models/PartType.d.ts +1 -0
  32. package/dist/esm/models/PartType.js +2 -1
  33. package/dist/esm/models/ReferenceType.d.ts +1 -0
  34. package/dist/esm/models/ReferenceType.js +1 -0
  35. package/dist/esm/models/SearchSkillsRequest.d.ts +59 -0
  36. package/dist/esm/models/SearchSkillsRequest.js +64 -0
  37. package/dist/esm/models/SearchSkillsResponse.d.ts +48 -0
  38. package/dist/esm/models/SearchSkillsResponse.js +43 -0
  39. package/dist/esm/models/SkillOrder.d.ts +26 -0
  40. package/dist/esm/models/SkillOrder.js +44 -0
  41. package/dist/esm/models/SkillResponse.d.ts +147 -0
  42. package/dist/esm/models/SkillResponse.js +101 -0
  43. package/dist/esm/models/SkillScriptFile.d.ts +53 -0
  44. package/dist/esm/models/SkillScriptFile.js +52 -0
  45. package/dist/esm/models/SkillSearchResult.d.ts +71 -0
  46. package/dist/esm/models/SkillSearchResult.js +60 -0
  47. package/dist/esm/models/SkillVersionResponse.d.ts +71 -0
  48. package/dist/esm/models/SkillVersionResponse.js +58 -0
  49. package/dist/esm/models/UpdateSkillRequest.d.ts +54 -0
  50. package/dist/esm/models/UpdateSkillRequest.js +50 -0
  51. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  52. package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +6 -0
  53. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +6 -0
  54. package/dist/esm/models/WorkflowDefinitionResponse.js +2 -0
  55. package/dist/esm/models/WorkflowRunSnapshot.d.ts +6 -0
  56. package/dist/esm/models/WorkflowRunSnapshot.js +2 -0
  57. package/dist/esm/models/index.d.ts +13 -2
  58. package/dist/esm/models/index.js +13 -2
  59. package/dist/models/ActivateSkillVersionRequest.d.ts +47 -0
  60. package/dist/models/ActivateSkillVersionRequest.js +50 -0
  61. package/dist/models/CreateSkillRequest.d.ts +60 -0
  62. package/dist/models/CreateSkillRequest.js +67 -0
  63. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +6 -0
  64. package/dist/models/CreateWorkflowDefinitionRequest.js +6 -0
  65. package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.d.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.d.ts} +9 -6
  66. package/dist/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.js → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.js} +15 -10
  67. package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.d.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.d.ts} +16 -16
  68. package/dist/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.js → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.js} +18 -18
  69. package/dist/models/PaginatedResponseSkillResponse.d.ts +66 -0
  70. package/dist/models/PaginatedResponseSkillResponse.js +78 -0
  71. package/dist/models/PartType.d.ts +1 -0
  72. package/dist/models/PartType.js +2 -1
  73. package/dist/models/ReferenceType.d.ts +1 -0
  74. package/dist/models/ReferenceType.js +1 -0
  75. package/dist/models/SearchSkillsRequest.d.ts +59 -0
  76. package/dist/models/SearchSkillsRequest.js +72 -0
  77. package/dist/models/SearchSkillsResponse.d.ts +48 -0
  78. package/dist/models/SearchSkillsResponse.js +51 -0
  79. package/dist/models/SkillOrder.d.ts +26 -0
  80. package/dist/models/SkillOrder.js +52 -0
  81. package/dist/models/SkillResponse.d.ts +147 -0
  82. package/dist/models/SkillResponse.js +109 -0
  83. package/dist/models/SkillScriptFile.d.ts +53 -0
  84. package/dist/models/SkillScriptFile.js +60 -0
  85. package/dist/models/SkillSearchResult.d.ts +71 -0
  86. package/dist/models/SkillSearchResult.js +68 -0
  87. package/dist/models/SkillVersionResponse.d.ts +71 -0
  88. package/dist/models/SkillVersionResponse.js +66 -0
  89. package/dist/models/UpdateSkillRequest.d.ts +54 -0
  90. package/dist/models/UpdateSkillRequest.js +58 -0
  91. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -0
  92. package/dist/models/UpdateWorkflowDefinitionRequest.js +6 -0
  93. package/dist/models/WorkflowDefinitionResponse.d.ts +6 -0
  94. package/dist/models/WorkflowDefinitionResponse.js +2 -0
  95. package/dist/models/WorkflowRunSnapshot.d.ts +6 -0
  96. package/dist/models/WorkflowRunSnapshot.js +2 -0
  97. package/dist/models/index.d.ts +13 -2
  98. package/dist/models/index.js +13 -2
  99. package/docs/ActivateSkillVersionRequest.md +35 -0
  100. package/docs/ChunksApi.md +1 -1
  101. package/docs/CreateSkillRequest.md +39 -0
  102. package/docs/CreateWorkflowDefinitionRequest.md +2 -0
  103. package/docs/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.md → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md} +12 -4
  104. package/docs/FoldersApi.md +4 -4
  105. package/docs/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.md → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.md} +5 -5
  106. package/docs/PaginatedResponseSkillResponse.md +40 -0
  107. package/docs/SearchSkillsRequest.md +39 -0
  108. package/docs/SearchSkillsResponse.md +34 -0
  109. package/docs/SkillOrder.md +33 -0
  110. package/docs/SkillResponse.md +65 -0
  111. package/docs/SkillScriptFile.md +37 -0
  112. package/docs/SkillSearchResult.md +43 -0
  113. package/docs/SkillVersionResponse.md +43 -0
  114. package/docs/SkillsApi.md +1093 -0
  115. package/docs/UpdateSkillRequest.md +37 -0
  116. package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
  117. package/docs/WorkflowDefinitionResponse.md +2 -0
  118. package/docs/WorkflowDefinitionsApi.md +4 -1
  119. package/docs/WorkflowRunSnapshot.md +2 -0
  120. package/package.json +1 -1
  121. package/src/apis/FoldersApi.ts +13 -13
  122. package/src/apis/SkillsApi.ts +1321 -0
  123. package/src/apis/WorkflowDefinitionsApi.ts +7 -0
  124. package/src/apis/index.ts +1 -0
  125. package/src/models/ActivateSkillVersionRequest.ts +82 -0
  126. package/src/models/CreateSkillRequest.ts +115 -0
  127. package/src/models/CreateWorkflowDefinitionRequest.ts +12 -0
  128. package/src/models/{FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaResponseOrDataSourceTableResponseOrApiConnectionResponse.ts → FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.ts} +19 -8
  129. package/src/models/{PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDataSourceResponseDataSourceSchemaResponseDataSourceTableResponseApiConnectionResponseDiscriminator.ts → PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat.ts} +25 -25
  130. package/src/models/PaginatedResponseSkillResponse.ts +130 -0
  131. package/src/models/PartType.ts +2 -1
  132. package/src/models/ReferenceType.ts +1 -0
  133. package/src/models/SearchSkillsRequest.ts +114 -0
  134. package/src/models/SearchSkillsResponse.ts +90 -0
  135. package/src/models/SkillOrder.ts +54 -0
  136. package/src/models/SkillResponse.ts +244 -0
  137. package/src/models/SkillScriptFile.ts +95 -0
  138. package/src/models/SkillSearchResult.ts +119 -0
  139. package/src/models/SkillVersionResponse.ts +118 -0
  140. package/src/models/UpdateSkillRequest.ts +102 -0
  141. package/src/models/UpdateWorkflowDefinitionRequest.ts +12 -0
  142. package/src/models/WorkflowDefinitionResponse.ts +8 -0
  143. package/src/models/WorkflowRunSnapshot.ts +8 -0
  144. package/src/models/index.ts +13 -2
@@ -0,0 +1,101 @@
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 { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
15
+ import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
16
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
17
+ /**
18
+ * @export
19
+ */
20
+ export const SkillResponsePartTypeEnum = {
21
+ Skill: 'SKILL'
22
+ };
23
+ export const SkillResponsePropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the SkillResponse interface.
26
+ */
27
+ export function instanceOfSkillResponse(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
31
+ return false;
32
+ if (!('parentPathPartId' in value) || value['parentPathPartId'] === undefined)
33
+ return false;
34
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
35
+ return false;
36
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
37
+ return false;
38
+ if (!('name' in value) || value['name'] === undefined)
39
+ return false;
40
+ if (!('description' in value) || value['description'] === undefined)
41
+ return false;
42
+ if (!('approvalState' in value) || value['approvalState'] === undefined)
43
+ return false;
44
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
45
+ return false;
46
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
47
+ return false;
48
+ return true;
49
+ }
50
+ export function SkillResponseFromJSON(json) {
51
+ return SkillResponseFromJSONTyped(json, false);
52
+ }
53
+ export function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+ 'partType': json['part_type'] == null ? undefined : json['part_type'],
59
+ 'id': json['id'],
60
+ 'pathPartId': json['path_part_id'],
61
+ 'parentPathPartId': json['parent_path_part_id'],
62
+ 'materializedPath': json['materialized_path'],
63
+ 'tenantId': json['tenant_id'],
64
+ 'name': json['name'],
65
+ 'description': json['description'],
66
+ 'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
67
+ 'scriptNames': json['script_names'] == null ? undefined : json['script_names'],
68
+ 'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
69
+ 'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
70
+ 'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
71
+ 'createdAt': (new Date(json['created_at'])),
72
+ 'updatedAt': (new Date(json['updated_at'])),
73
+ 'permissions': json['permissions'] == null ? undefined : ItemPermissionsFromJSON(json['permissions']),
74
+ };
75
+ }
76
+ export function SkillResponseToJSON(json) {
77
+ return SkillResponseToJSONTyped(json, false);
78
+ }
79
+ export function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+ return {
84
+ 'part_type': value['partType'],
85
+ 'id': value['id'],
86
+ 'path_part_id': value['pathPartId'],
87
+ 'parent_path_part_id': value['parentPathPartId'],
88
+ 'materialized_path': value['materializedPath'],
89
+ 'tenant_id': value['tenantId'],
90
+ 'name': value['name'],
91
+ 'description': value['description'],
92
+ 'skill_md': value['skillMd'],
93
+ 'script_names': value['scriptNames'],
94
+ 'has_unpublished_changes': value['hasUnpublishedChanges'],
95
+ 'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
96
+ 'owner': UserInfoToJSON(value['owner']),
97
+ 'created_at': value['createdAt'].toISOString(),
98
+ 'updated_at': value['updatedAt'].toISOString(),
99
+ 'permissions': ItemPermissionsToJSON(value['permissions']),
100
+ };
101
+ }
@@ -0,0 +1,53 @@
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
+ * A single script bundled under a skill's ``scripts/`` folder.
14
+ * @export
15
+ * @interface SkillScriptFile
16
+ */
17
+ export interface SkillScriptFile {
18
+ /**
19
+ * Script file name, e.g. inspect.py
20
+ * @type {string}
21
+ * @memberof SkillScriptFile
22
+ */
23
+ name: string;
24
+ /**
25
+ * Script file contents (UTF-8 text).
26
+ * @type {string}
27
+ * @memberof SkillScriptFile
28
+ */
29
+ content: string;
30
+ }
31
+ export declare const SkillScriptFilePropertyValidationAttributesMap: {
32
+ [property: string]: {
33
+ maxLength?: number;
34
+ minLength?: number;
35
+ pattern?: string;
36
+ maximum?: number;
37
+ exclusiveMaximum?: boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: boolean;
40
+ multipleOf?: number;
41
+ maxItems?: number;
42
+ minItems?: number;
43
+ uniqueItems?: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * Check if a given object implements the SkillScriptFile interface.
48
+ */
49
+ export declare function instanceOfSkillScriptFile(value: object): value is SkillScriptFile;
50
+ export declare function SkillScriptFileFromJSON(json: any): SkillScriptFile;
51
+ export declare function SkillScriptFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillScriptFile;
52
+ export declare function SkillScriptFileToJSON(json: any): SkillScriptFile;
53
+ export declare function SkillScriptFileToJSONTyped(value?: SkillScriptFile | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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 SkillScriptFilePropertyValidationAttributesMap = {
15
+ name: {
16
+ maxLength: 255,
17
+ },
18
+ };
19
+ /**
20
+ * Check if a given object implements the SkillScriptFile interface.
21
+ */
22
+ export function instanceOfSkillScriptFile(value) {
23
+ if (!('name' in value) || value['name'] === undefined)
24
+ return false;
25
+ if (!('content' in value) || value['content'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function SkillScriptFileFromJSON(json) {
30
+ return SkillScriptFileFromJSONTyped(json, false);
31
+ }
32
+ export function SkillScriptFileFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'name': json['name'],
38
+ 'content': json['content'],
39
+ };
40
+ }
41
+ export function SkillScriptFileToJSON(json) {
42
+ return SkillScriptFileToJSONTyped(json, false);
43
+ }
44
+ export function SkillScriptFileToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'name': value['name'],
50
+ 'content': value['content'],
51
+ };
52
+ }
@@ -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 skill matched by semantic search.
14
+ * @export
15
+ * @interface SkillSearchResult
16
+ */
17
+ export interface SkillSearchResult {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SkillSearchResult
22
+ */
23
+ skillId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SkillSearchResult
28
+ */
29
+ name: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SkillSearchResult
34
+ */
35
+ description: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SkillSearchResult
40
+ */
41
+ materializedPath: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof SkillSearchResult
46
+ */
47
+ score: number;
48
+ }
49
+ export declare const SkillSearchResultPropertyValidationAttributesMap: {
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 SkillSearchResult interface.
66
+ */
67
+ export declare function instanceOfSkillSearchResult(value: object): value is SkillSearchResult;
68
+ export declare function SkillSearchResultFromJSON(json: any): SkillSearchResult;
69
+ export declare function SkillSearchResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillSearchResult;
70
+ export declare function SkillSearchResultToJSON(json: any): SkillSearchResult;
71
+ export declare function SkillSearchResultToJSONTyped(value?: SkillSearchResult | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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 SkillSearchResultPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the SkillSearchResult interface.
17
+ */
18
+ export function instanceOfSkillSearchResult(value) {
19
+ if (!('skillId' in value) || value['skillId'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ if (!('description' in value) || value['description'] === undefined)
24
+ return false;
25
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
26
+ return false;
27
+ if (!('score' in value) || value['score'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function SkillSearchResultFromJSON(json) {
32
+ return SkillSearchResultFromJSONTyped(json, false);
33
+ }
34
+ export function SkillSearchResultFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'skillId': json['skill_id'],
40
+ 'name': json['name'],
41
+ 'description': json['description'],
42
+ 'materializedPath': json['materialized_path'],
43
+ 'score': json['score'],
44
+ };
45
+ }
46
+ export function SkillSearchResultToJSON(json) {
47
+ return SkillSearchResultToJSONTyped(json, false);
48
+ }
49
+ export function SkillSearchResultToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'skill_id': value['skillId'],
55
+ 'name': value['name'],
56
+ 'description': value['description'],
57
+ 'materialized_path': value['materializedPath'],
58
+ 'score': value['score'],
59
+ };
60
+ }
@@ -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 published version of a skill.
14
+ * @export
15
+ * @interface SkillVersionResponse
16
+ */
17
+ export interface SkillVersionResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SkillVersionResponse
22
+ */
23
+ versionId: string;
24
+ /**
25
+ * Monotonic version number (0, 1, 2, …)
26
+ * @type {number}
27
+ * @memberof SkillVersionResponse
28
+ */
29
+ version: number;
30
+ /**
31
+ * Content hash of the version bundle.
32
+ * @type {string}
33
+ * @memberof SkillVersionResponse
34
+ */
35
+ contentSha256?: string | null;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof SkillVersionResponse
40
+ */
41
+ isActive: boolean;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof SkillVersionResponse
46
+ */
47
+ createdAt: Date;
48
+ }
49
+ export declare const SkillVersionResponsePropertyValidationAttributesMap: {
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 SkillVersionResponse interface.
66
+ */
67
+ export declare function instanceOfSkillVersionResponse(value: object): value is SkillVersionResponse;
68
+ export declare function SkillVersionResponseFromJSON(json: any): SkillVersionResponse;
69
+ export declare function SkillVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillVersionResponse;
70
+ export declare function SkillVersionResponseToJSON(json: any): SkillVersionResponse;
71
+ export declare function SkillVersionResponseToJSONTyped(value?: SkillVersionResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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 SkillVersionResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the SkillVersionResponse interface.
17
+ */
18
+ export function instanceOfSkillVersionResponse(value) {
19
+ if (!('versionId' in value) || value['versionId'] === undefined)
20
+ return false;
21
+ if (!('version' in value) || value['version'] === undefined)
22
+ return false;
23
+ if (!('isActive' in value) || value['isActive'] === undefined)
24
+ return false;
25
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function SkillVersionResponseFromJSON(json) {
30
+ return SkillVersionResponseFromJSONTyped(json, false);
31
+ }
32
+ export function SkillVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'versionId': json['version_id'],
38
+ 'version': json['version'],
39
+ 'contentSha256': json['content_sha256'] == null ? undefined : json['content_sha256'],
40
+ 'isActive': json['is_active'],
41
+ 'createdAt': (new Date(json['created_at'])),
42
+ };
43
+ }
44
+ export function SkillVersionResponseToJSON(json) {
45
+ return SkillVersionResponseToJSONTyped(json, false);
46
+ }
47
+ export function SkillVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'version_id': value['versionId'],
53
+ 'version': value['version'],
54
+ 'content_sha256': value['contentSha256'],
55
+ 'is_active': value['isActive'],
56
+ 'created_at': value['createdAt'].toISOString(),
57
+ };
58
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SkillScriptFile } from './SkillScriptFile';
13
+ /**
14
+ * Edit working-copy files in place (does NOT cut a version).
15
+ * @export
16
+ * @interface UpdateSkillRequest
17
+ */
18
+ export interface UpdateSkillRequest {
19
+ /**
20
+ * Replacement SKILL.md, written to the working copy in place; null leaves it unchanged. Publish a version to snapshot; the active version is unchanged until then.
21
+ * @type {string}
22
+ * @memberof UpdateSkillRequest
23
+ */
24
+ skillMd?: string | null;
25
+ /**
26
+ * Replace the working-copy scripts set (add/overwrite/remove to match); null leaves scripts unchanged, [] removes them all.
27
+ * @type {Array<SkillScriptFile>}
28
+ * @memberof UpdateSkillRequest
29
+ */
30
+ scripts?: Array<SkillScriptFile> | null;
31
+ }
32
+ export declare const UpdateSkillRequestPropertyValidationAttributesMap: {
33
+ [property: string]: {
34
+ maxLength?: number;
35
+ minLength?: number;
36
+ pattern?: string;
37
+ maximum?: number;
38
+ exclusiveMaximum?: boolean;
39
+ minimum?: number;
40
+ exclusiveMinimum?: boolean;
41
+ multipleOf?: number;
42
+ maxItems?: number;
43
+ minItems?: number;
44
+ uniqueItems?: boolean;
45
+ };
46
+ };
47
+ /**
48
+ * Check if a given object implements the UpdateSkillRequest interface.
49
+ */
50
+ export declare function instanceOfUpdateSkillRequest(value: object): value is UpdateSkillRequest;
51
+ export declare function UpdateSkillRequestFromJSON(json: any): UpdateSkillRequest;
52
+ export declare function UpdateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSkillRequest;
53
+ export declare function UpdateSkillRequestToJSON(json: any): UpdateSkillRequest;
54
+ export declare function UpdateSkillRequestToJSONTyped(value?: UpdateSkillRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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 UpdateSkillRequestPropertyValidationAttributesMap = {
16
+ scripts: {
17
+ maxItems: 50,
18
+ uniqueItems: false,
19
+ },
20
+ };
21
+ /**
22
+ * Check if a given object implements the UpdateSkillRequest interface.
23
+ */
24
+ export function instanceOfUpdateSkillRequest(value) {
25
+ return true;
26
+ }
27
+ export function UpdateSkillRequestFromJSON(json) {
28
+ return UpdateSkillRequestFromJSONTyped(json, false);
29
+ }
30
+ export function UpdateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
36
+ 'scripts': json['scripts'] == null ? undefined : (json['scripts'].map(SkillScriptFileFromJSON)),
37
+ };
38
+ }
39
+ export function UpdateSkillRequestToJSON(json) {
40
+ return UpdateSkillRequestToJSONTyped(json, false);
41
+ }
42
+ export function UpdateSkillRequestToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'skill_md': value['skillMd'],
48
+ 'scripts': value['scripts'] == null ? undefined : (value['scripts'].map(SkillScriptFileToJSON)),
49
+ };
50
+ }
@@ -57,6 +57,12 @@ export interface UpdateWorkflowDefinitionRequest {
57
57
  * @memberof UpdateWorkflowDefinitionRequest
58
58
  */
59
59
  approvalRequired: boolean;
60
+ /**
61
+ * Skill PDO ids force-loaded into every run by default. Retain-on-None PUT semantics: null (or omit) keeps the stored list, [] clears, a list replaces. Each must be a readable SKILL.
62
+ * @type {Array<string>}
63
+ * @memberof UpdateWorkflowDefinitionRequest
64
+ */
65
+ selectedSkillIds?: Array<string> | null;
60
66
  /**
61
67
  * Common files attached to every run (DOCUMENT / FOLDER / DATA_SOURCE / API_CONNECTION path_part ids). Like ``instruction_path_part_id``, this is the exception to PUT semantics: null (or omit) retains the stored list; pass [] to clear; pass a list to replace it wholesale. The caller must be able to read each one.
62
68
  * @type {Array<string>}
@@ -21,6 +21,10 @@ export const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
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 UpdateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscrim
53
57
  'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
54
58
  'isActive': json['is_active'],
55
59
  'approvalRequired': json['approval_required'],
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 UpdateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscrimi
71
76
  'parent_path_part_id': value['parentPathPartId'],
72
77
  'is_active': value['isActive'],
73
78
  'approval_required': value['approvalRequired'],
79
+ 'selected_skill_ids': value['selectedSkillIds'],
74
80
  'common_file_path_part_ids': value['commonFilePathPartIds'],
75
81
  };
76
82
  }
@@ -102,6 +102,12 @@ export interface WorkflowDefinitionResponse {
102
102
  * @memberof WorkflowDefinitionResponse
103
103
  */
104
104
  isTemplate: boolean;
105
+ /**
106
+ * Skill PDO ids force-loaded into every run by default. The FE prefills these as the run's selected skills.
107
+ * @type {Array<string>}
108
+ * @memberof WorkflowDefinitionResponse
109
+ */
110
+ selectedSkillIds?: Array<string>;
105
111
  /**
106
112
  * Common files attached to every run (path_part ids). The FE renders these as 'attached to every run' on the workflow page.
107
113
  * @type {Array<string>}