@knowledge-stack/ksapi 1.139.1 → 1.140.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +28 -0
- package/README.md +25 -11
- package/dist/apis/AdminKbApi.d.ts +109 -0
- package/dist/apis/AdminKbApi.js +172 -0
- package/dist/apis/AdminWorkflowsApi.d.ts +252 -0
- package/dist/apis/AdminWorkflowsApi.js +337 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/AdminKbApi.d.ts +109 -0
- package/dist/esm/apis/AdminKbApi.js +135 -0
- package/dist/esm/apis/AdminWorkflowsApi.d.ts +252 -0
- package/dist/esm/apis/AdminWorkflowsApi.js +300 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/CitedChunk.d.ts +6 -4
- package/dist/esm/models/DefinitionOutputStat.d.ts +65 -0
- package/dist/esm/models/DefinitionOutputStat.js +56 -0
- package/dist/esm/models/HourHistogramResponse.d.ts +53 -0
- package/dist/esm/models/HourHistogramResponse.js +54 -0
- package/dist/esm/models/KbMetric.d.ts +26 -0
- package/dist/esm/models/KbMetric.js +44 -0
- package/dist/esm/models/KbSummaryResponse.d.ts +152 -0
- package/dist/esm/models/KbSummaryResponse.js +109 -0
- package/dist/esm/models/KbTimeseriesResponse.d.ts +71 -0
- package/dist/esm/models/KbTimeseriesResponse.js +57 -0
- package/dist/esm/models/LabeledSeries.d.ts +54 -0
- package/dist/esm/models/LabeledSeries.js +47 -0
- package/dist/esm/models/LeaderboardEntry.d.ts +59 -0
- package/dist/esm/models/LeaderboardEntry.js +52 -0
- package/dist/esm/models/RunTimeseriesResponse.d.ts +61 -0
- package/dist/esm/models/RunTimeseriesResponse.js +52 -0
- package/dist/esm/models/TimeBucket.d.ts +27 -0
- package/dist/esm/models/TimeBucket.js +45 -0
- package/dist/esm/models/TimeseriesPoint.d.ts +53 -0
- package/dist/esm/models/TimeseriesPoint.js +48 -0
- package/dist/esm/models/WorkflowLeaderboardResponse.d.ts +54 -0
- package/dist/esm/models/WorkflowLeaderboardResponse.js +45 -0
- package/dist/esm/models/WorkflowOutputStatsResponse.d.ts +54 -0
- package/dist/esm/models/WorkflowOutputStatsResponse.js +47 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/CitedChunk.d.ts +6 -4
- package/dist/models/DefinitionOutputStat.d.ts +65 -0
- package/dist/models/DefinitionOutputStat.js +64 -0
- package/dist/models/HourHistogramResponse.d.ts +53 -0
- package/dist/models/HourHistogramResponse.js +62 -0
- package/dist/models/KbMetric.d.ts +26 -0
- package/dist/models/KbMetric.js +52 -0
- package/dist/models/KbSummaryResponse.d.ts +152 -0
- package/dist/models/KbSummaryResponse.js +117 -0
- package/dist/models/KbTimeseriesResponse.d.ts +71 -0
- package/dist/models/KbTimeseriesResponse.js +65 -0
- package/dist/models/LabeledSeries.d.ts +54 -0
- package/dist/models/LabeledSeries.js +55 -0
- package/dist/models/LeaderboardEntry.d.ts +59 -0
- package/dist/models/LeaderboardEntry.js +60 -0
- package/dist/models/RunTimeseriesResponse.d.ts +61 -0
- package/dist/models/RunTimeseriesResponse.js +60 -0
- package/dist/models/TimeBucket.d.ts +27 -0
- package/dist/models/TimeBucket.js +53 -0
- package/dist/models/TimeseriesPoint.d.ts +53 -0
- package/dist/models/TimeseriesPoint.js +56 -0
- package/dist/models/WorkflowLeaderboardResponse.d.ts +54 -0
- package/dist/models/WorkflowLeaderboardResponse.js +53 -0
- package/dist/models/WorkflowOutputStatsResponse.d.ts +54 -0
- package/dist/models/WorkflowOutputStatsResponse.js +55 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/AdminKbApi.md +163 -0
- package/docs/AdminWorkflowsApi.md +424 -0
- package/docs/CitedChunk.md +1 -1
- package/docs/DefinitionOutputStat.md +41 -0
- package/docs/HourHistogramResponse.md +37 -0
- package/docs/KbMetric.md +33 -0
- package/docs/KbSummaryResponse.md +67 -0
- package/docs/KbTimeseriesResponse.md +41 -0
- package/docs/LabeledSeries.md +37 -0
- package/docs/LeaderboardEntry.md +39 -0
- package/docs/RunTimeseriesResponse.md +39 -0
- package/docs/TimeBucket.md +33 -0
- package/docs/TimeseriesPoint.md +37 -0
- package/docs/WorkflowLeaderboardResponse.md +37 -0
- package/docs/WorkflowOutputStatsResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/AdminKbApi.ts +237 -0
- package/src/apis/AdminWorkflowsApi.ts +539 -0
- package/src/apis/index.ts +2 -0
- package/src/models/CitedChunk.ts +6 -4
- package/src/models/DefinitionOutputStat.ts +110 -0
- package/src/models/HourHistogramResponse.ts +97 -0
- package/src/models/KbMetric.ts +54 -0
- package/src/models/KbSummaryResponse.ts +235 -0
- package/src/models/KbTimeseriesResponse.ts +136 -0
- package/src/models/LabeledSeries.ts +99 -0
- package/src/models/LeaderboardEntry.ts +101 -0
- package/src/models/RunTimeseriesResponse.ts +117 -0
- package/src/models/TimeBucket.ts +55 -0
- package/src/models/TimeseriesPoint.ts +92 -0
- package/src/models/WorkflowLeaderboardResponse.ts +98 -0
- package/src/models/WorkflowOutputStatsResponse.ts +99 -0
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,152 @@
|
|
|
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 { MeteredQuotaStatus } from './MeteredQuotaStatus';
|
|
13
|
+
/**
|
|
14
|
+
* Point-in-time knowledge-base totals for a tenant.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface KbSummaryResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface KbSummaryResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof KbSummaryResponse
|
|
23
|
+
*/
|
|
24
|
+
documentsTotal: number;
|
|
25
|
+
/**
|
|
26
|
+
* Live document count keyed by document_origin.
|
|
27
|
+
* @type {{ [key: string]: number; }}
|
|
28
|
+
* @memberof KbSummaryResponse
|
|
29
|
+
*/
|
|
30
|
+
documentsByOrigin: {
|
|
31
|
+
[key: string]: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Live document count keyed by document_type.
|
|
35
|
+
* @type {{ [key: string]: number; }}
|
|
36
|
+
* @memberof KbSummaryResponse
|
|
37
|
+
*/
|
|
38
|
+
documentsByType: {
|
|
39
|
+
[key: string]: number;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof KbSummaryResponse
|
|
45
|
+
*/
|
|
46
|
+
documentVersionsTotal: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof KbSummaryResponse
|
|
51
|
+
*/
|
|
52
|
+
chunksTotal: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {{ [key: string]: number; }}
|
|
56
|
+
* @memberof KbSummaryResponse
|
|
57
|
+
*/
|
|
58
|
+
chunksByType: {
|
|
59
|
+
[key: string]: number;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Sum of chunk.num_tokens (cl100k).
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof KbSummaryResponse
|
|
65
|
+
*/
|
|
66
|
+
tokensTotal: number;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof KbSummaryResponse
|
|
71
|
+
*/
|
|
72
|
+
sectionsTotal: number;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof KbSummaryResponse
|
|
77
|
+
*/
|
|
78
|
+
threadsTotal: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof KbSummaryResponse
|
|
83
|
+
*/
|
|
84
|
+
messagesTotal: number;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {{ [key: string]: number; }}
|
|
88
|
+
* @memberof KbSummaryResponse
|
|
89
|
+
*/
|
|
90
|
+
messagesByRole: {
|
|
91
|
+
[key: string]: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {number}
|
|
96
|
+
* @memberof KbSummaryResponse
|
|
97
|
+
*/
|
|
98
|
+
dataSourcesTotal: number;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @memberof KbSummaryResponse
|
|
103
|
+
*/
|
|
104
|
+
dataSourceTablesTotal: number;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {number}
|
|
108
|
+
* @memberof KbSummaryResponse
|
|
109
|
+
*/
|
|
110
|
+
documentsCheckedOut: number;
|
|
111
|
+
/**
|
|
112
|
+
* Current-period usage vs limit per metered resource.
|
|
113
|
+
* @type {Array<MeteredQuotaStatus>}
|
|
114
|
+
* @memberof KbSummaryResponse
|
|
115
|
+
*/
|
|
116
|
+
quota: Array<MeteredQuotaStatus>;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @memberof KbSummaryResponse
|
|
121
|
+
*/
|
|
122
|
+
feedbackUp: number;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {number}
|
|
126
|
+
* @memberof KbSummaryResponse
|
|
127
|
+
*/
|
|
128
|
+
feedbackDown: number;
|
|
129
|
+
}
|
|
130
|
+
export declare const KbSummaryResponsePropertyValidationAttributesMap: {
|
|
131
|
+
[property: string]: {
|
|
132
|
+
maxLength?: number;
|
|
133
|
+
minLength?: number;
|
|
134
|
+
pattern?: string;
|
|
135
|
+
maximum?: number;
|
|
136
|
+
exclusiveMaximum?: boolean;
|
|
137
|
+
minimum?: number;
|
|
138
|
+
exclusiveMinimum?: boolean;
|
|
139
|
+
multipleOf?: number;
|
|
140
|
+
maxItems?: number;
|
|
141
|
+
minItems?: number;
|
|
142
|
+
uniqueItems?: boolean;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Check if a given object implements the KbSummaryResponse interface.
|
|
147
|
+
*/
|
|
148
|
+
export declare function instanceOfKbSummaryResponse(value: object): value is KbSummaryResponse;
|
|
149
|
+
export declare function KbSummaryResponseFromJSON(json: any): KbSummaryResponse;
|
|
150
|
+
export declare function KbSummaryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KbSummaryResponse;
|
|
151
|
+
export declare function KbSummaryResponseToJSON(json: any): KbSummaryResponse;
|
|
152
|
+
export declare function KbSummaryResponseToJSONTyped(value?: KbSummaryResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,109 @@
|
|
|
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 { MeteredQuotaStatusFromJSON, MeteredQuotaStatusToJSON, } from './MeteredQuotaStatus';
|
|
15
|
+
export const KbSummaryResponsePropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the KbSummaryResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfKbSummaryResponse(value) {
|
|
20
|
+
if (!('documentsTotal' in value) || value['documentsTotal'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('documentsByOrigin' in value) || value['documentsByOrigin'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('documentsByType' in value) || value['documentsByType'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('documentVersionsTotal' in value) || value['documentVersionsTotal'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('chunksTotal' in value) || value['chunksTotal'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('chunksByType' in value) || value['chunksByType'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('tokensTotal' in value) || value['tokensTotal'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('sectionsTotal' in value) || value['sectionsTotal'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('threadsTotal' in value) || value['threadsTotal'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('messagesTotal' in value) || value['messagesTotal'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('messagesByRole' in value) || value['messagesByRole'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('dataSourcesTotal' in value) || value['dataSourcesTotal'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('dataSourceTablesTotal' in value) || value['dataSourceTablesTotal'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('documentsCheckedOut' in value) || value['documentsCheckedOut'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('quota' in value) || value['quota'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('feedbackUp' in value) || value['feedbackUp'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (!('feedbackDown' in value) || value['feedbackDown'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
export function KbSummaryResponseFromJSON(json) {
|
|
57
|
+
return KbSummaryResponseFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
export function KbSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'documentsTotal': json['documents_total'],
|
|
65
|
+
'documentsByOrigin': json['documents_by_origin'],
|
|
66
|
+
'documentsByType': json['documents_by_type'],
|
|
67
|
+
'documentVersionsTotal': json['document_versions_total'],
|
|
68
|
+
'chunksTotal': json['chunks_total'],
|
|
69
|
+
'chunksByType': json['chunks_by_type'],
|
|
70
|
+
'tokensTotal': json['tokens_total'],
|
|
71
|
+
'sectionsTotal': json['sections_total'],
|
|
72
|
+
'threadsTotal': json['threads_total'],
|
|
73
|
+
'messagesTotal': json['messages_total'],
|
|
74
|
+
'messagesByRole': json['messages_by_role'],
|
|
75
|
+
'dataSourcesTotal': json['data_sources_total'],
|
|
76
|
+
'dataSourceTablesTotal': json['data_source_tables_total'],
|
|
77
|
+
'documentsCheckedOut': json['documents_checked_out'],
|
|
78
|
+
'quota': (json['quota'].map(MeteredQuotaStatusFromJSON)),
|
|
79
|
+
'feedbackUp': json['feedback_up'],
|
|
80
|
+
'feedbackDown': json['feedback_down'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function KbSummaryResponseToJSON(json) {
|
|
84
|
+
return KbSummaryResponseToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
export function KbSummaryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
'documents_total': value['documentsTotal'],
|
|
92
|
+
'documents_by_origin': value['documentsByOrigin'],
|
|
93
|
+
'documents_by_type': value['documentsByType'],
|
|
94
|
+
'document_versions_total': value['documentVersionsTotal'],
|
|
95
|
+
'chunks_total': value['chunksTotal'],
|
|
96
|
+
'chunks_by_type': value['chunksByType'],
|
|
97
|
+
'tokens_total': value['tokensTotal'],
|
|
98
|
+
'sections_total': value['sectionsTotal'],
|
|
99
|
+
'threads_total': value['threadsTotal'],
|
|
100
|
+
'messages_total': value['messagesTotal'],
|
|
101
|
+
'messages_by_role': value['messagesByRole'],
|
|
102
|
+
'data_sources_total': value['dataSourcesTotal'],
|
|
103
|
+
'data_source_tables_total': value['dataSourceTablesTotal'],
|
|
104
|
+
'documents_checked_out': value['documentsCheckedOut'],
|
|
105
|
+
'quota': (value['quota'].map(MeteredQuotaStatusToJSON)),
|
|
106
|
+
'feedback_up': value['feedbackUp'],
|
|
107
|
+
'feedback_down': value['feedbackDown'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -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
|
+
import type { KbMetric } from './KbMetric';
|
|
13
|
+
import type { TimeBucket } from './TimeBucket';
|
|
14
|
+
import type { LabeledSeries } from './LabeledSeries';
|
|
15
|
+
/**
|
|
16
|
+
* A knowledge-base metric bucketed over time.
|
|
17
|
+
*
|
|
18
|
+
* ``series`` carries one entry per split — two (SOURCE / GENERATED) for
|
|
19
|
+
* ``document_uploads``, one for the ingestion metrics.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface KbTimeseriesResponse
|
|
22
|
+
*/
|
|
23
|
+
export interface KbTimeseriesResponse {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {KbMetric}
|
|
27
|
+
* @memberof KbTimeseriesResponse
|
|
28
|
+
*/
|
|
29
|
+
metric: KbMetric;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof KbTimeseriesResponse
|
|
34
|
+
*/
|
|
35
|
+
timezone: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {TimeBucket}
|
|
39
|
+
* @memberof KbTimeseriesResponse
|
|
40
|
+
*/
|
|
41
|
+
bucket: TimeBucket;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Array<LabeledSeries>}
|
|
45
|
+
* @memberof KbTimeseriesResponse
|
|
46
|
+
*/
|
|
47
|
+
series?: Array<LabeledSeries>;
|
|
48
|
+
}
|
|
49
|
+
export declare const KbTimeseriesResponsePropertyValidationAttributesMap: {
|
|
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 KbTimeseriesResponse interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfKbTimeseriesResponse(value: object): value is KbTimeseriesResponse;
|
|
68
|
+
export declare function KbTimeseriesResponseFromJSON(json: any): KbTimeseriesResponse;
|
|
69
|
+
export declare function KbTimeseriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): KbTimeseriesResponse;
|
|
70
|
+
export declare function KbTimeseriesResponseToJSON(json: any): KbTimeseriesResponse;
|
|
71
|
+
export declare function KbTimeseriesResponseToJSONTyped(value?: KbTimeseriesResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { KbMetricFromJSON, KbMetricToJSON, } from './KbMetric';
|
|
15
|
+
import { TimeBucketFromJSON, TimeBucketToJSON, } from './TimeBucket';
|
|
16
|
+
import { LabeledSeriesFromJSON, LabeledSeriesToJSON, } from './LabeledSeries';
|
|
17
|
+
export const KbTimeseriesResponsePropertyValidationAttributesMap = {};
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the KbTimeseriesResponse interface.
|
|
20
|
+
*/
|
|
21
|
+
export function instanceOfKbTimeseriesResponse(value) {
|
|
22
|
+
if (!('metric' in value) || value['metric'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('timezone' in value) || value['timezone'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('bucket' in value) || value['bucket'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
export function KbTimeseriesResponseFromJSON(json) {
|
|
31
|
+
return KbTimeseriesResponseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function KbTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'metric': KbMetricFromJSON(json['metric']),
|
|
39
|
+
'timezone': json['timezone'],
|
|
40
|
+
'bucket': TimeBucketFromJSON(json['bucket']),
|
|
41
|
+
'series': json['series'] == null ? undefined : (json['series'].map(LabeledSeriesFromJSON)),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function KbTimeseriesResponseToJSON(json) {
|
|
45
|
+
return KbTimeseriesResponseToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function KbTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'metric': KbMetricToJSON(value['metric']),
|
|
53
|
+
'timezone': value['timezone'],
|
|
54
|
+
'bucket': TimeBucketToJSON(value['bucket']),
|
|
55
|
+
'series': value['series'] == null ? undefined : (value['series'].map(LabeledSeriesToJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -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 { TimeseriesPoint } from './TimeseriesPoint';
|
|
13
|
+
/**
|
|
14
|
+
* A named series (e.g. one per document origin or ingestion outcome).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface LabeledSeries
|
|
17
|
+
*/
|
|
18
|
+
export interface LabeledSeries {
|
|
19
|
+
/**
|
|
20
|
+
* Series label, e.g. 'SOURCE' or 'FAILED'.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof LabeledSeries
|
|
23
|
+
*/
|
|
24
|
+
label: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<TimeseriesPoint>}
|
|
28
|
+
* @memberof LabeledSeries
|
|
29
|
+
*/
|
|
30
|
+
points?: Array<TimeseriesPoint>;
|
|
31
|
+
}
|
|
32
|
+
export declare const LabeledSeriesPropertyValidationAttributesMap: {
|
|
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 LabeledSeries interface.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instanceOfLabeledSeries(value: object): value is LabeledSeries;
|
|
51
|
+
export declare function LabeledSeriesFromJSON(json: any): LabeledSeries;
|
|
52
|
+
export declare function LabeledSeriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): LabeledSeries;
|
|
53
|
+
export declare function LabeledSeriesToJSON(json: any): LabeledSeries;
|
|
54
|
+
export declare function LabeledSeriesToJSONTyped(value?: LabeledSeries | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { TimeseriesPointFromJSON, TimeseriesPointToJSON, } from './TimeseriesPoint';
|
|
15
|
+
export const LabeledSeriesPropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the LabeledSeries interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfLabeledSeries(value) {
|
|
20
|
+
if (!('label' in value) || value['label'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function LabeledSeriesFromJSON(json) {
|
|
25
|
+
return LabeledSeriesFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function LabeledSeriesFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'label': json['label'],
|
|
33
|
+
'points': json['points'] == null ? undefined : (json['points'].map(TimeseriesPointFromJSON)),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function LabeledSeriesToJSON(json) {
|
|
37
|
+
return LabeledSeriesToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function LabeledSeriesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'label': value['label'],
|
|
45
|
+
'points': value['points'] == null ? undefined : (value['points'].map(TimeseriesPointToJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -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
|
+
* One ranked entry (a workflow definition or a user).
|
|
14
|
+
* @export
|
|
15
|
+
* @interface LeaderboardEntry
|
|
16
|
+
*/
|
|
17
|
+
export interface LeaderboardEntry {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LeaderboardEntry
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LeaderboardEntry
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Run count.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof LeaderboardEntry
|
|
34
|
+
*/
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
37
|
+
export declare const LeaderboardEntryPropertyValidationAttributesMap: {
|
|
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 LeaderboardEntry interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfLeaderboardEntry(value: object): value is LeaderboardEntry;
|
|
56
|
+
export declare function LeaderboardEntryFromJSON(json: any): LeaderboardEntry;
|
|
57
|
+
export declare function LeaderboardEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): LeaderboardEntry;
|
|
58
|
+
export declare function LeaderboardEntryToJSON(json: any): LeaderboardEntry;
|
|
59
|
+
export declare function LeaderboardEntryToJSONTyped(value?: LeaderboardEntry | 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 LeaderboardEntryPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the LeaderboardEntry interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfLeaderboardEntry(value) {
|
|
19
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function LeaderboardEntryFromJSON(json) {
|
|
28
|
+
return LeaderboardEntryFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function LeaderboardEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': json['id'],
|
|
36
|
+
'name': json['name'],
|
|
37
|
+
'count': json['count'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function LeaderboardEntryToJSON(json) {
|
|
41
|
+
return LeaderboardEntryToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function LeaderboardEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'id': value['id'],
|
|
49
|
+
'name': value['name'],
|
|
50
|
+
'count': value['count'],
|
|
51
|
+
};
|
|
52
|
+
}
|