@knowledge-stack/ksapi 3.16.1 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +26 -4
- package/README.md +23 -4
- package/dist/apis/MemoryApi.d.ts +5 -5
- package/dist/apis/MemoryApi.js +1 -1
- package/dist/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/apis/WorkflowMemoryApi.js +4 -4
- package/dist/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/apis/WorkflowRepositoryApi.js +595 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/MemoryApi.d.ts +5 -5
- package/dist/esm/apis/MemoryApi.js +2 -2
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/esm/apis/WorkflowMemoryApi.js +5 -5
- package/dist/esm/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/esm/apis/WorkflowRepositoryApi.js +558 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ErrorResponse.d.ts +7 -0
- package/dist/esm/models/ErrorResponse.js +7 -0
- package/dist/esm/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/esm/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +9 -9
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +12 -12
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.js +70 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.js +55 -0
- package/dist/esm/models/RepoBranchResponse.d.ts +126 -0
- package/dist/esm/models/RepoBranchResponse.js +95 -0
- package/dist/esm/models/RepoCommitSummary.d.ts +71 -0
- package/dist/esm/models/RepoCommitSummary.js +60 -0
- package/dist/esm/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/esm/models/RepoSaveSkipReason.js +54 -0
- package/dist/esm/models/RepoSnapshot.d.ts +59 -0
- package/dist/esm/models/RepoSnapshot.js +50 -0
- package/dist/esm/models/RepoTreeEntry.d.ts +59 -0
- package/dist/esm/models/RepoTreeEntry.js +52 -0
- package/dist/esm/models/RepoTreeResponse.d.ts +54 -0
- package/dist/esm/models/RepoTreeResponse.js +49 -0
- package/dist/esm/models/RepoVersionResponse.d.ts +95 -0
- package/dist/esm/models/RepoVersionResponse.js +74 -0
- package/dist/esm/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/esm/models/WorkflowRepoResponse.js +81 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +3 -0
- package/dist/esm/models/index.d.ts +12 -2
- package/dist/esm/models/index.js +12 -2
- package/dist/models/ErrorResponse.d.ts +7 -0
- package/dist/models/ErrorResponse.js +7 -0
- package/dist/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +15 -15
- package/dist/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +18 -18
- package/dist/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseRepoVersionResponse.js +78 -0
- package/dist/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/models/RecordRepoSaveSkipRequest.js +63 -0
- package/dist/models/RepoBranchResponse.d.ts +126 -0
- package/dist/models/RepoBranchResponse.js +103 -0
- package/dist/models/RepoCommitSummary.d.ts +71 -0
- package/dist/models/RepoCommitSummary.js +68 -0
- package/dist/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/models/RepoSaveSkipReason.js +62 -0
- package/dist/models/RepoSnapshot.d.ts +59 -0
- package/dist/models/RepoSnapshot.js +58 -0
- package/dist/models/RepoTreeEntry.d.ts +59 -0
- package/dist/models/RepoTreeEntry.js +60 -0
- package/dist/models/RepoTreeResponse.d.ts +54 -0
- package/dist/models/RepoTreeResponse.js +57 -0
- package/dist/models/RepoVersionResponse.d.ts +95 -0
- package/dist/models/RepoVersionResponse.js +82 -0
- package/dist/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/models/WorkflowRepoResponse.js +89 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/models/WorkflowRunSnapshot.js +3 -0
- package/dist/models/index.d.ts +12 -2
- package/dist/models/index.js +12 -2
- package/docs/MemoryApi.md +2 -2
- package/docs/{MemoryChunkResponse.md → MemoryEntryResponse.md} +4 -4
- package/docs/{PaginatedResponseMemoryChunkResponse.md → PaginatedResponseMemoryEntryResponse.md} +5 -5
- package/docs/PaginatedResponseRepoVersionResponse.md +40 -0
- package/docs/RecordRepoSaveSkipRequest.md +38 -0
- package/docs/RepoBranchResponse.md +61 -0
- package/docs/RepoCommitSummary.md +42 -0
- package/docs/RepoSaveSkipReason.md +33 -0
- package/docs/RepoSnapshot.md +39 -0
- package/docs/RepoTreeEntry.md +38 -0
- package/docs/RepoTreeResponse.md +36 -0
- package/docs/RepoVersionResponse.md +51 -0
- package/docs/WorkflowMemoryApi.md +8 -8
- package/docs/WorkflowRepoResponse.md +53 -0
- package/docs/WorkflowRepositoryApi.md +745 -0
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/package.json +1 -1
- package/src/apis/MemoryApi.ts +8 -8
- package/src/apis/WorkflowMemoryApi.ts +26 -26
- package/src/apis/WorkflowRepositoryApi.ts +1002 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ErrorResponse.ts +7 -0
- package/src/models/{MemoryChunkResponse.ts → MemoryEntryResponse.ts} +14 -14
- package/src/models/{PaginatedResponseMemoryChunkResponse.ts → PaginatedResponseMemoryEntryResponse.ts} +25 -25
- package/src/models/PaginatedResponseRepoVersionResponse.ts +130 -0
- package/src/models/RecordRepoSaveSkipRequest.ts +113 -0
- package/src/models/RepoBranchResponse.ts +207 -0
- package/src/models/RepoCommitSummary.ts +119 -0
- package/src/models/RepoSaveSkipReason.ts +64 -0
- package/src/models/RepoSnapshot.ts +100 -0
- package/src/models/RepoTreeEntry.ts +101 -0
- package/src/models/RepoTreeResponse.ts +100 -0
- package/src/models/RepoVersionResponse.ts +154 -0
- package/src/models/WorkflowRepoResponse.ts +172 -0
- package/src/models/WorkflowRunSnapshot.ts +15 -0
- package/src/models/index.ts +12 -2
|
@@ -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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RepoCommitSummary
|
|
16
|
+
*/
|
|
17
|
+
export interface RepoCommitSummary {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RepoCommitSummary
|
|
22
|
+
*/
|
|
23
|
+
sha: string;
|
|
24
|
+
/**
|
|
25
|
+
* First line of the commit message.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof RepoCommitSummary
|
|
28
|
+
*/
|
|
29
|
+
subject: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof RepoCommitSummary
|
|
34
|
+
*/
|
|
35
|
+
authoredAt: Date;
|
|
36
|
+
/**
|
|
37
|
+
* The run saving this repository snapshot.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof RepoCommitSummary
|
|
40
|
+
*/
|
|
41
|
+
runId: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof RepoCommitSummary
|
|
46
|
+
*/
|
|
47
|
+
savedByUserId: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const RepoCommitSummaryPropertyValidationAttributesMap: {
|
|
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 RepoCommitSummary interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfRepoCommitSummary(value: object): value is RepoCommitSummary;
|
|
68
|
+
export declare function RepoCommitSummaryFromJSON(json: any): RepoCommitSummary;
|
|
69
|
+
export declare function RepoCommitSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoCommitSummary;
|
|
70
|
+
export declare function RepoCommitSummaryToJSON(json: any): RepoCommitSummary;
|
|
71
|
+
export declare function RepoCommitSummaryToJSONTyped(value?: RepoCommitSummary | 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 RepoCommitSummaryPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the RepoCommitSummary interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfRepoCommitSummary(value) {
|
|
19
|
+
if (!('sha' in value) || value['sha'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('subject' in value) || value['subject'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('authoredAt' in value) || value['authoredAt'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('runId' in value) || value['runId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('savedByUserId' in value) || value['savedByUserId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function RepoCommitSummaryFromJSON(json) {
|
|
32
|
+
return RepoCommitSummaryFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function RepoCommitSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'sha': json['sha'],
|
|
40
|
+
'subject': json['subject'],
|
|
41
|
+
'authoredAt': (new Date(json['authored_at'])),
|
|
42
|
+
'runId': json['run_id'],
|
|
43
|
+
'savedByUserId': json['saved_by_user_id'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function RepoCommitSummaryToJSON(json) {
|
|
47
|
+
return RepoCommitSummaryToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function RepoCommitSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'sha': value['sha'],
|
|
55
|
+
'subject': value['subject'],
|
|
56
|
+
'authored_at': value['authoredAt'].toISOString(),
|
|
57
|
+
'run_id': value['runId'],
|
|
58
|
+
'saved_by_user_id': value['savedByUserId'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* Why retention or integration could not complete.
|
|
14
|
+
*
|
|
15
|
+
* ``conflict``: integration failed; a retained branch remains recoverable.
|
|
16
|
+
* ``history_rewrite``:
|
|
17
|
+
* the run rewrote saved history. ``no_write``: the turn's user cannot write the
|
|
18
|
+
* workflow. ``uncommitted``: changes were never committed to the assigned branch.
|
|
19
|
+
* ``rejected``: the platform refused the bundle (too large, unsafe paths).
|
|
20
|
+
* ``failed``: the checkout or the save itself failed.
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export declare const RepoSaveSkipReason: {
|
|
24
|
+
readonly Conflict: 'conflict';
|
|
25
|
+
readonly HistoryRewrite: 'history_rewrite';
|
|
26
|
+
readonly NoWrite: 'no_write';
|
|
27
|
+
readonly Uncommitted: 'uncommitted';
|
|
28
|
+
readonly Rejected: 'rejected';
|
|
29
|
+
readonly Failed: 'failed';
|
|
30
|
+
};
|
|
31
|
+
export type RepoSaveSkipReason = typeof RepoSaveSkipReason[keyof typeof RepoSaveSkipReason];
|
|
32
|
+
export declare function instanceOfRepoSaveSkipReason(value: any): boolean;
|
|
33
|
+
export declare function RepoSaveSkipReasonFromJSON(json: any): RepoSaveSkipReason;
|
|
34
|
+
export declare function RepoSaveSkipReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSaveSkipReason;
|
|
35
|
+
export declare function RepoSaveSkipReasonToJSON(value?: RepoSaveSkipReason | null): any;
|
|
36
|
+
export declare function RepoSaveSkipReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): RepoSaveSkipReason;
|
|
@@ -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
|
+
* Why retention or integration could not complete.
|
|
16
|
+
*
|
|
17
|
+
* ``conflict``: integration failed; a retained branch remains recoverable.
|
|
18
|
+
* ``history_rewrite``:
|
|
19
|
+
* the run rewrote saved history. ``no_write``: the turn's user cannot write the
|
|
20
|
+
* workflow. ``uncommitted``: changes were never committed to the assigned branch.
|
|
21
|
+
* ``rejected``: the platform refused the bundle (too large, unsafe paths).
|
|
22
|
+
* ``failed``: the checkout or the save itself failed.
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const RepoSaveSkipReason = {
|
|
26
|
+
Conflict: 'conflict',
|
|
27
|
+
HistoryRewrite: 'history_rewrite',
|
|
28
|
+
NoWrite: 'no_write',
|
|
29
|
+
Uncommitted: 'uncommitted',
|
|
30
|
+
Rejected: 'rejected',
|
|
31
|
+
Failed: 'failed'
|
|
32
|
+
};
|
|
33
|
+
export function instanceOfRepoSaveSkipReason(value) {
|
|
34
|
+
for (const key in RepoSaveSkipReason) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(RepoSaveSkipReason, key)) {
|
|
36
|
+
if (RepoSaveSkipReason[key] === value) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
export function RepoSaveSkipReasonFromJSON(json) {
|
|
44
|
+
return RepoSaveSkipReasonFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function RepoSaveSkipReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
export function RepoSaveSkipReasonToJSON(value) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
export function RepoSaveSkipReasonToJSONTyped(value, ignoreDiscriminator) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* The workflow repository version a run was started against.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RepoSnapshot
|
|
16
|
+
*/
|
|
17
|
+
export interface RepoSnapshot {
|
|
18
|
+
/**
|
|
19
|
+
* Commit id of main the run checks out
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RepoSnapshot
|
|
22
|
+
*/
|
|
23
|
+
commit: string;
|
|
24
|
+
/**
|
|
25
|
+
* DocumentVersion holding that main's bundle
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof RepoSnapshot
|
|
28
|
+
*/
|
|
29
|
+
versionId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Instruction version (DOCUMENT_VERSION path_part) that repository version was saved against; the runner compares it with this run's pinned instruction.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof RepoSnapshot
|
|
34
|
+
*/
|
|
35
|
+
instructionVersionId?: string | null;
|
|
36
|
+
}
|
|
37
|
+
export declare const RepoSnapshotPropertyValidationAttributesMap: {
|
|
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
|
+
* Check if a given object implements the RepoSnapshot interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfRepoSnapshot(value: object): value is RepoSnapshot;
|
|
56
|
+
export declare function RepoSnapshotFromJSON(json: any): RepoSnapshot;
|
|
57
|
+
export declare function RepoSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSnapshot;
|
|
58
|
+
export declare function RepoSnapshotToJSON(json: any): RepoSnapshot;
|
|
59
|
+
export declare function RepoSnapshotToJSONTyped(value?: RepoSnapshot | 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
|
+
export const RepoSnapshotPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the RepoSnapshot interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfRepoSnapshot(value) {
|
|
19
|
+
if (!('commit' in value) || value['commit'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('versionId' in value) || value['versionId'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function RepoSnapshotFromJSON(json) {
|
|
26
|
+
return RepoSnapshotFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function RepoSnapshotFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'commit': json['commit'],
|
|
34
|
+
'versionId': json['version_id'],
|
|
35
|
+
'instructionVersionId': json['instruction_version_id'] == null ? undefined : json['instruction_version_id'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function RepoSnapshotToJSON(json) {
|
|
39
|
+
return RepoSnapshotToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function RepoSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'commit': value['commit'],
|
|
47
|
+
'version_id': value['versionId'],
|
|
48
|
+
'instruction_version_id': value['instructionVersionId'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 RepoTreeEntry
|
|
16
|
+
*/
|
|
17
|
+
export interface RepoTreeEntry {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RepoTreeEntry
|
|
22
|
+
*/
|
|
23
|
+
path: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof RepoTreeEntry
|
|
28
|
+
*/
|
|
29
|
+
size: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof RepoTreeEntry
|
|
34
|
+
*/
|
|
35
|
+
isBinary: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const RepoTreeEntryPropertyValidationAttributesMap: {
|
|
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
|
+
* Check if a given object implements the RepoTreeEntry interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfRepoTreeEntry(value: object): value is RepoTreeEntry;
|
|
56
|
+
export declare function RepoTreeEntryFromJSON(json: any): RepoTreeEntry;
|
|
57
|
+
export declare function RepoTreeEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeEntry;
|
|
58
|
+
export declare function RepoTreeEntryToJSON(json: any): RepoTreeEntry;
|
|
59
|
+
export declare function RepoTreeEntryToJSONTyped(value?: RepoTreeEntry | 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 RepoTreeEntryPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the RepoTreeEntry interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfRepoTreeEntry(value) {
|
|
19
|
+
if (!('path' in value) || value['path'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('size' in value) || value['size'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('isBinary' in value) || value['isBinary'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function RepoTreeEntryFromJSON(json) {
|
|
28
|
+
return RepoTreeEntryFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function RepoTreeEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'path': json['path'],
|
|
36
|
+
'size': json['size'],
|
|
37
|
+
'isBinary': json['is_binary'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function RepoTreeEntryToJSON(json) {
|
|
41
|
+
return RepoTreeEntryToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function RepoTreeEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'path': value['path'],
|
|
49
|
+
'size': value['size'],
|
|
50
|
+
'is_binary': value['isBinary'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -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 { RepoTreeEntry } from './RepoTreeEntry';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface RepoTreeResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface RepoTreeResponse {
|
|
19
|
+
/**
|
|
20
|
+
* Null when the repository does not exist.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof RepoTreeResponse
|
|
23
|
+
*/
|
|
24
|
+
commit: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Every file, path-sorted.
|
|
27
|
+
* @type {Array<RepoTreeEntry>}
|
|
28
|
+
* @memberof RepoTreeResponse
|
|
29
|
+
*/
|
|
30
|
+
entries: Array<RepoTreeEntry>;
|
|
31
|
+
}
|
|
32
|
+
export declare const RepoTreeResponsePropertyValidationAttributesMap: {
|
|
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 RepoTreeResponse interface.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instanceOfRepoTreeResponse(value: object): value is RepoTreeResponse;
|
|
51
|
+
export declare function RepoTreeResponseFromJSON(json: any): RepoTreeResponse;
|
|
52
|
+
export declare function RepoTreeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeResponse;
|
|
53
|
+
export declare function RepoTreeResponseToJSON(json: any): RepoTreeResponse;
|
|
54
|
+
export declare function RepoTreeResponseToJSONTyped(value?: RepoTreeResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { RepoTreeEntryFromJSON, RepoTreeEntryToJSON, } from './RepoTreeEntry';
|
|
15
|
+
export const RepoTreeResponsePropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the RepoTreeResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfRepoTreeResponse(value) {
|
|
20
|
+
if (!('commit' in value) || value['commit'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('entries' in value) || value['entries'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function RepoTreeResponseFromJSON(json) {
|
|
27
|
+
return RepoTreeResponseFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function RepoTreeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'commit': json['commit'],
|
|
35
|
+
'entries': (json['entries'].map(RepoTreeEntryFromJSON)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function RepoTreeResponseToJSON(json) {
|
|
39
|
+
return RepoTreeResponseToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function RepoTreeResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'commit': value['commit'],
|
|
47
|
+
'entries': (value['entries'].map(RepoTreeEntryToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|