@knowledge-stack/ksapi 3.15.1 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -331,6 +331,7 @@ docs/SheetVisibilityChange.md
331
331
  docs/SignInRequest.md
332
332
  docs/SignUpResponse.md
333
333
  docs/SkillFile.md
334
+ docs/SkillFileDocument.md
334
335
  docs/SkillOrder.md
335
336
  docs/SkillResponse.md
336
337
  docs/SkillSearchResult.md
@@ -810,6 +811,7 @@ src/models/SheetVisibilityChange.ts
810
811
  src/models/SignInRequest.ts
811
812
  src/models/SignUpResponse.ts
812
813
  src/models/SkillFile.ts
814
+ src/models/SkillFileDocument.ts
813
815
  src/models/SkillOrder.ts
814
816
  src/models/SkillResponse.ts
815
817
  src/models/SkillSearchResult.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@3.15.1
1
+ # @knowledge-stack/ksapi@3.16.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -614,6 +614,7 @@ All URIs are relative to *http://localhost:8000*
614
614
  - [SignInRequest](docs/SignInRequest.md)
615
615
  - [SignUpResponse](docs/SignUpResponse.md)
616
616
  - [SkillFile](docs/SkillFile.md)
617
+ - [SkillFileDocument](docs/SkillFileDocument.md)
617
618
  - [SkillOrder](docs/SkillOrder.md)
618
619
  - [SkillResponse](docs/SkillResponse.md)
619
620
  - [SkillSearchResult](docs/SkillSearchResult.md)
@@ -756,7 +757,7 @@ and is automatically generated by the
756
757
  [OpenAPI Generator](https://openapi-generator.tech) project:
757
758
 
758
759
  - API version: `0.1.0`
759
- - Package version: `3.15.1`
760
+ - Package version: `3.16.0`
760
761
  - Generator version: `7.21.0`
761
762
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
762
763
 
@@ -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
+ *
14
+ * @export
15
+ * @interface SkillFileDocument
16
+ */
17
+ export interface SkillFileDocument {
18
+ /**
19
+ * Path relative to the skill root, e.g. SKILL.md
20
+ * @type {string}
21
+ * @memberof SkillFileDocument
22
+ */
23
+ path: string;
24
+ /**
25
+ * The file's Document id, as used in an @[doc:<id>] reference
26
+ * @type {string}
27
+ * @memberof SkillFileDocument
28
+ */
29
+ documentId: string;
30
+ }
31
+ export declare const SkillFileDocumentPropertyValidationAttributesMap: {
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 SkillFileDocument interface.
48
+ */
49
+ export declare function instanceOfSkillFileDocument(value: object): value is SkillFileDocument;
50
+ export declare function SkillFileDocumentFromJSON(json: any): SkillFileDocument;
51
+ export declare function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument;
52
+ export declare function SkillFileDocumentToJSON(json: any): SkillFileDocument;
53
+ export declare function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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 SkillFileDocumentPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the SkillFileDocument interface.
17
+ */
18
+ export function instanceOfSkillFileDocument(value) {
19
+ if (!('path' in value) || value['path'] === undefined)
20
+ return false;
21
+ if (!('documentId' in value) || value['documentId'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function SkillFileDocumentFromJSON(json) {
26
+ return SkillFileDocumentFromJSONTyped(json, false);
27
+ }
28
+ export function SkillFileDocumentFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'path': json['path'],
34
+ 'documentId': json['document_id'],
35
+ };
36
+ }
37
+ export function SkillFileDocumentToJSON(json) {
38
+ return SkillFileDocumentToJSONTyped(json, false);
39
+ }
40
+ export function SkillFileDocumentToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'path': value['path'],
46
+ 'document_id': value['documentId'],
47
+ };
48
+ }
@@ -13,6 +13,7 @@ import type { ItemPermissions } from './ItemPermissions';
13
13
  import type { SkillFile } from './SkillFile';
14
14
  import type { PathPartApprovalState } from './PathPartApprovalState';
15
15
  import type { UserInfo } from './UserInfo';
16
+ import type { SkillFileDocument } from './SkillFileDocument';
16
17
  /**
17
18
  * Skill response; ``part_type`` is the folder-listing discriminator.
18
19
  * @export
@@ -85,6 +86,12 @@ export interface SkillResponse {
85
86
  * @memberof SkillResponse
86
87
  */
87
88
  files?: Array<SkillFile> | null;
89
+ /**
90
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
91
+ * @type {Array<SkillFileDocument>}
92
+ * @memberof SkillResponse
93
+ */
94
+ fileDocuments?: Array<SkillFileDocument>;
88
95
  /**
89
96
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
90
97
  * @type {boolean}
@@ -15,6 +15,7 @@ import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissio
15
15
  import { SkillFileFromJSON, SkillFileToJSON, } from './SkillFile';
16
16
  import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
17
17
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
18
+ import { SkillFileDocumentFromJSON, SkillFileDocumentToJSON, } from './SkillFileDocument';
18
19
  /**
19
20
  * @export
20
21
  */
@@ -67,6 +68,7 @@ export function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
67
68
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
68
69
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
69
70
  'files': json['files'] == null ? undefined : (json['files'].map(SkillFileFromJSON)),
71
+ 'fileDocuments': json['file_documents'] == null ? undefined : (json['file_documents'].map(SkillFileDocumentFromJSON)),
70
72
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
71
73
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
72
74
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
@@ -94,6 +96,7 @@ export function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
94
96
  'skill_md': value['skillMd'],
95
97
  'file_paths': value['filePaths'],
96
98
  'files': value['files'] == null ? undefined : (value['files'].map(SkillFileToJSON)),
99
+ 'file_documents': value['fileDocuments'] == null ? undefined : (value['fileDocuments'].map(SkillFileDocumentToJSON)),
97
100
  'has_unpublished_changes': value['hasUnpublishedChanges'],
98
101
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
99
102
  'owner': UserInfoToJSON(value['owner']),
@@ -299,6 +299,7 @@ export * from './SheetVisibilityChange';
299
299
  export * from './SignInRequest';
300
300
  export * from './SignUpResponse';
301
301
  export * from './SkillFile';
302
+ export * from './SkillFileDocument';
302
303
  export * from './SkillOrder';
303
304
  export * from './SkillResponse';
304
305
  export * from './SkillSearchResult';
@@ -301,6 +301,7 @@ export * from './SheetVisibilityChange';
301
301
  export * from './SignInRequest';
302
302
  export * from './SignUpResponse';
303
303
  export * from './SkillFile';
304
+ export * from './SkillFileDocument';
304
305
  export * from './SkillOrder';
305
306
  export * from './SkillResponse';
306
307
  export * from './SkillSearchResult';
@@ -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
+ *
14
+ * @export
15
+ * @interface SkillFileDocument
16
+ */
17
+ export interface SkillFileDocument {
18
+ /**
19
+ * Path relative to the skill root, e.g. SKILL.md
20
+ * @type {string}
21
+ * @memberof SkillFileDocument
22
+ */
23
+ path: string;
24
+ /**
25
+ * The file's Document id, as used in an @[doc:<id>] reference
26
+ * @type {string}
27
+ * @memberof SkillFileDocument
28
+ */
29
+ documentId: string;
30
+ }
31
+ export declare const SkillFileDocumentPropertyValidationAttributesMap: {
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 SkillFileDocument interface.
48
+ */
49
+ export declare function instanceOfSkillFileDocument(value: object): value is SkillFileDocument;
50
+ export declare function SkillFileDocumentFromJSON(json: any): SkillFileDocument;
51
+ export declare function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument;
52
+ export declare function SkillFileDocumentToJSON(json: any): SkillFileDocument;
53
+ export declare function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SkillFileDocumentPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfSkillFileDocument = instanceOfSkillFileDocument;
18
+ exports.SkillFileDocumentFromJSON = SkillFileDocumentFromJSON;
19
+ exports.SkillFileDocumentFromJSONTyped = SkillFileDocumentFromJSONTyped;
20
+ exports.SkillFileDocumentToJSON = SkillFileDocumentToJSON;
21
+ exports.SkillFileDocumentToJSONTyped = SkillFileDocumentToJSONTyped;
22
+ exports.SkillFileDocumentPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the SkillFileDocument interface.
25
+ */
26
+ function instanceOfSkillFileDocument(value) {
27
+ if (!('path' in value) || value['path'] === undefined)
28
+ return false;
29
+ if (!('documentId' in value) || value['documentId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function SkillFileDocumentFromJSON(json) {
34
+ return SkillFileDocumentFromJSONTyped(json, false);
35
+ }
36
+ function SkillFileDocumentFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'path': json['path'],
42
+ 'documentId': json['document_id'],
43
+ };
44
+ }
45
+ function SkillFileDocumentToJSON(json) {
46
+ return SkillFileDocumentToJSONTyped(json, false);
47
+ }
48
+ function SkillFileDocumentToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'path': value['path'],
54
+ 'document_id': value['documentId'],
55
+ };
56
+ }
@@ -13,6 +13,7 @@ import type { ItemPermissions } from './ItemPermissions';
13
13
  import type { SkillFile } from './SkillFile';
14
14
  import type { PathPartApprovalState } from './PathPartApprovalState';
15
15
  import type { UserInfo } from './UserInfo';
16
+ import type { SkillFileDocument } from './SkillFileDocument';
16
17
  /**
17
18
  * Skill response; ``part_type`` is the folder-listing discriminator.
18
19
  * @export
@@ -85,6 +86,12 @@ export interface SkillResponse {
85
86
  * @memberof SkillResponse
86
87
  */
87
88
  files?: Array<SkillFile> | null;
89
+ /**
90
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
91
+ * @type {Array<SkillFileDocument>}
92
+ * @memberof SkillResponse
93
+ */
94
+ fileDocuments?: Array<SkillFileDocument>;
88
95
  /**
89
96
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
90
97
  * @type {boolean}
@@ -23,6 +23,7 @@ const ItemPermissions_1 = require("./ItemPermissions");
23
23
  const SkillFile_1 = require("./SkillFile");
24
24
  const PathPartApprovalState_1 = require("./PathPartApprovalState");
25
25
  const UserInfo_1 = require("./UserInfo");
26
+ const SkillFileDocument_1 = require("./SkillFileDocument");
26
27
  /**
27
28
  * @export
28
29
  */
@@ -75,6 +76,7 @@ function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
75
76
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
76
77
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
77
78
  'files': json['files'] == null ? undefined : (json['files'].map(SkillFile_1.SkillFileFromJSON)),
79
+ 'fileDocuments': json['file_documents'] == null ? undefined : (json['file_documents'].map(SkillFileDocument_1.SkillFileDocumentFromJSON)),
78
80
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
79
81
  'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
80
82
  'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
@@ -102,6 +104,7 @@ function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
102
104
  'skill_md': value['skillMd'],
103
105
  'file_paths': value['filePaths'],
104
106
  'files': value['files'] == null ? undefined : (value['files'].map(SkillFile_1.SkillFileToJSON)),
107
+ 'file_documents': value['fileDocuments'] == null ? undefined : (value['fileDocuments'].map(SkillFileDocument_1.SkillFileDocumentToJSON)),
105
108
  'has_unpublished_changes': value['hasUnpublishedChanges'],
106
109
  'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
107
110
  'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
@@ -299,6 +299,7 @@ export * from './SheetVisibilityChange';
299
299
  export * from './SignInRequest';
300
300
  export * from './SignUpResponse';
301
301
  export * from './SkillFile';
302
+ export * from './SkillFileDocument';
302
303
  export * from './SkillOrder';
303
304
  export * from './SkillResponse';
304
305
  export * from './SkillSearchResult';
@@ -317,6 +317,7 @@ __exportStar(require("./SheetVisibilityChange"), exports);
317
317
  __exportStar(require("./SignInRequest"), exports);
318
318
  __exportStar(require("./SignUpResponse"), exports);
319
319
  __exportStar(require("./SkillFile"), exports);
320
+ __exportStar(require("./SkillFileDocument"), exports);
320
321
  __exportStar(require("./SkillOrder"), exports);
321
322
  __exportStar(require("./SkillResponse"), exports);
322
323
  __exportStar(require("./SkillSearchResult"), exports);
@@ -75,6 +75,7 @@ Name | Type
75
75
  `skillMd` | string
76
76
  `filePaths` | Array&lt;string&gt;
77
77
  `files` | [Array&lt;SkillFile&gt;](SkillFile.md)
78
+ `fileDocuments` | [Array&lt;SkillFileDocument&gt;](SkillFileDocument.md)
78
79
  `hasUnpublishedChanges` | boolean
79
80
 
80
81
  ## Example
@@ -153,6 +154,7 @@ const example = {
153
154
  "skillMd": null,
154
155
  "filePaths": null,
155
156
  "files": null,
157
+ "fileDocuments": null,
156
158
  "hasUnpublishedChanges": null,
157
159
  } satisfies FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
158
160
 
@@ -0,0 +1,36 @@
1
+
2
+ # SkillFileDocument
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `path` | string
10
+ `documentId` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { SkillFileDocument } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "path": null,
20
+ "documentId": null,
21
+ } satisfies SkillFileDocument
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as SkillFileDocument
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -18,6 +18,7 @@ Name | Type
18
18
  `skillMd` | string
19
19
  `filePaths` | Array&lt;string&gt;
20
20
  `files` | [Array&lt;SkillFile&gt;](SkillFile.md)
21
+ `fileDocuments` | [Array&lt;SkillFileDocument&gt;](SkillFileDocument.md)
21
22
  `hasUnpublishedChanges` | boolean
22
23
  `approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
23
24
  `owner` | [UserInfo](UserInfo.md)
@@ -43,6 +44,7 @@ const example = {
43
44
  "skillMd": null,
44
45
  "filePaths": null,
45
46
  "files": null,
47
+ "fileDocuments": null,
46
48
  "hasUnpublishedChanges": null,
47
49
  "approvalState": null,
48
50
  "owner": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "3.15.1",
3
+ "version": "3.16.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,92 @@
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
+ *
18
+ * @export
19
+ * @interface SkillFileDocument
20
+ */
21
+ export interface SkillFileDocument {
22
+ /**
23
+ * Path relative to the skill root, e.g. SKILL.md
24
+ * @type {string}
25
+ * @memberof SkillFileDocument
26
+ */
27
+ path: string;
28
+ /**
29
+ * The file's Document id, as used in an @[doc:<id>] reference
30
+ * @type {string}
31
+ * @memberof SkillFileDocument
32
+ */
33
+ documentId: string;
34
+ }
35
+ export const SkillFileDocumentPropertyValidationAttributesMap: {
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
+ }
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the SkillFileDocument interface.
55
+ */
56
+ export function instanceOfSkillFileDocument(value: object): value is SkillFileDocument {
57
+ if (!('path' in value) || value['path'] === undefined) return false;
58
+ if (!('documentId' in value) || value['documentId'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function SkillFileDocumentFromJSON(json: any): SkillFileDocument {
63
+ return SkillFileDocumentFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function SkillFileDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileDocument {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'path': json['path'],
73
+ 'documentId': json['document_id'],
74
+ };
75
+ }
76
+
77
+ export function SkillFileDocumentToJSON(json: any): SkillFileDocument {
78
+ return SkillFileDocumentToJSONTyped(json, false);
79
+ }
80
+
81
+ export function SkillFileDocumentToJSONTyped(value?: SkillFileDocument | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'path': value['path'],
89
+ 'document_id': value['documentId'],
90
+ };
91
+ }
92
+
@@ -41,6 +41,13 @@ import {
41
41
  UserInfoToJSON,
42
42
  UserInfoToJSONTyped,
43
43
  } from './UserInfo';
44
+ import type { SkillFileDocument } from './SkillFileDocument';
45
+ import {
46
+ SkillFileDocumentFromJSON,
47
+ SkillFileDocumentFromJSONTyped,
48
+ SkillFileDocumentToJSON,
49
+ SkillFileDocumentToJSONTyped,
50
+ } from './SkillFileDocument';
44
51
 
45
52
  /**
46
53
  * Skill response; ``part_type`` is the folder-listing discriminator.
@@ -114,6 +121,12 @@ export interface SkillResponse {
114
121
  * @memberof SkillResponse
115
122
  */
116
123
  files?: Array<SkillFile> | null;
124
+ /**
125
+ * Every working file with its Document id, SKILL.md included, sorted by path; populated with file_paths, empty on list.
126
+ * @type {Array<SkillFileDocument>}
127
+ * @memberof SkillResponse
128
+ */
129
+ fileDocuments?: Array<SkillFileDocument>;
117
130
  /**
118
131
  * 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.
119
132
  * @type {boolean}
@@ -217,6 +230,7 @@ export function SkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
217
230
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
218
231
  'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
219
232
  'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(SkillFileFromJSON)),
233
+ 'fileDocuments': json['file_documents'] == null ? undefined : ((json['file_documents'] as Array<any>).map(SkillFileDocumentFromJSON)),
220
234
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
221
235
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
222
236
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
@@ -248,6 +262,7 @@ export function SkillResponseToJSONTyped(value?: SkillResponse | null, ignoreDis
248
262
  'skill_md': value['skillMd'],
249
263
  'file_paths': value['filePaths'],
250
264
  'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(SkillFileToJSON)),
265
+ 'file_documents': value['fileDocuments'] == null ? undefined : ((value['fileDocuments'] as Array<any>).map(SkillFileDocumentToJSON)),
251
266
  'has_unpublished_changes': value['hasUnpublishedChanges'],
252
267
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
253
268
  'owner': UserInfoToJSON(value['owner']),
@@ -301,6 +301,7 @@ export * from './SheetVisibilityChange';
301
301
  export * from './SignInRequest';
302
302
  export * from './SignUpResponse';
303
303
  export * from './SkillFile';
304
+ export * from './SkillFileDocument';
304
305
  export * from './SkillOrder';
305
306
  export * from './SkillResponse';
306
307
  export * from './SkillSearchResult';