@knowledge-stack/ksapi 1.139.1 → 1.140.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 +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/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/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/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/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,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,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.KbTimeseriesResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfKbTimeseriesResponse = instanceOfKbTimeseriesResponse;
|
|
18
|
+
exports.KbTimeseriesResponseFromJSON = KbTimeseriesResponseFromJSON;
|
|
19
|
+
exports.KbTimeseriesResponseFromJSONTyped = KbTimeseriesResponseFromJSONTyped;
|
|
20
|
+
exports.KbTimeseriesResponseToJSON = KbTimeseriesResponseToJSON;
|
|
21
|
+
exports.KbTimeseriesResponseToJSONTyped = KbTimeseriesResponseToJSONTyped;
|
|
22
|
+
const KbMetric_1 = require("./KbMetric");
|
|
23
|
+
const TimeBucket_1 = require("./TimeBucket");
|
|
24
|
+
const LabeledSeries_1 = require("./LabeledSeries");
|
|
25
|
+
exports.KbTimeseriesResponsePropertyValidationAttributesMap = {};
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the KbTimeseriesResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
function instanceOfKbTimeseriesResponse(value) {
|
|
30
|
+
if (!('metric' in value) || value['metric'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('timezone' in value) || value['timezone'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('bucket' in value) || value['bucket'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function KbTimeseriesResponseFromJSON(json) {
|
|
39
|
+
return KbTimeseriesResponseFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function KbTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'metric': (0, KbMetric_1.KbMetricFromJSON)(json['metric']),
|
|
47
|
+
'timezone': json['timezone'],
|
|
48
|
+
'bucket': (0, TimeBucket_1.TimeBucketFromJSON)(json['bucket']),
|
|
49
|
+
'series': json['series'] == null ? undefined : (json['series'].map(LabeledSeries_1.LabeledSeriesFromJSON)),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function KbTimeseriesResponseToJSON(json) {
|
|
53
|
+
return KbTimeseriesResponseToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function KbTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'metric': (0, KbMetric_1.KbMetricToJSON)(value['metric']),
|
|
61
|
+
'timezone': value['timezone'],
|
|
62
|
+
'bucket': (0, TimeBucket_1.TimeBucketToJSON)(value['bucket']),
|
|
63
|
+
'series': value['series'] == null ? undefined : (value['series'].map(LabeledSeries_1.LabeledSeriesToJSON)),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.LabeledSeriesPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfLabeledSeries = instanceOfLabeledSeries;
|
|
18
|
+
exports.LabeledSeriesFromJSON = LabeledSeriesFromJSON;
|
|
19
|
+
exports.LabeledSeriesFromJSONTyped = LabeledSeriesFromJSONTyped;
|
|
20
|
+
exports.LabeledSeriesToJSON = LabeledSeriesToJSON;
|
|
21
|
+
exports.LabeledSeriesToJSONTyped = LabeledSeriesToJSONTyped;
|
|
22
|
+
const TimeseriesPoint_1 = require("./TimeseriesPoint");
|
|
23
|
+
exports.LabeledSeriesPropertyValidationAttributesMap = {};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the LabeledSeries interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfLabeledSeries(value) {
|
|
28
|
+
if (!('label' in value) || value['label'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function LabeledSeriesFromJSON(json) {
|
|
33
|
+
return LabeledSeriesFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function LabeledSeriesFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'label': json['label'],
|
|
41
|
+
'points': json['points'] == null ? undefined : (json['points'].map(TimeseriesPoint_1.TimeseriesPointFromJSON)),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function LabeledSeriesToJSON(json) {
|
|
45
|
+
return LabeledSeriesToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function LabeledSeriesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'label': value['label'],
|
|
53
|
+
'points': value['points'] == null ? undefined : (value['points'].map(TimeseriesPoint_1.TimeseriesPointToJSON)),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -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,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.LeaderboardEntryPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfLeaderboardEntry = instanceOfLeaderboardEntry;
|
|
18
|
+
exports.LeaderboardEntryFromJSON = LeaderboardEntryFromJSON;
|
|
19
|
+
exports.LeaderboardEntryFromJSONTyped = LeaderboardEntryFromJSONTyped;
|
|
20
|
+
exports.LeaderboardEntryToJSON = LeaderboardEntryToJSON;
|
|
21
|
+
exports.LeaderboardEntryToJSONTyped = LeaderboardEntryToJSONTyped;
|
|
22
|
+
exports.LeaderboardEntryPropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the LeaderboardEntry interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfLeaderboardEntry(value) {
|
|
27
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function LeaderboardEntryFromJSON(json) {
|
|
36
|
+
return LeaderboardEntryFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function LeaderboardEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'name': json['name'],
|
|
45
|
+
'count': json['count'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function LeaderboardEntryToJSON(json) {
|
|
49
|
+
return LeaderboardEntryToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function LeaderboardEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'id': value['id'],
|
|
57
|
+
'name': value['name'],
|
|
58
|
+
'count': value['count'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
import type { TimeBucket } from './TimeBucket';
|
|
14
|
+
/**
|
|
15
|
+
* Workflow runs bucketed over time.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface RunTimeseriesResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface RunTimeseriesResponse {
|
|
20
|
+
/**
|
|
21
|
+
* IANA timezone the buckets are in.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof RunTimeseriesResponse
|
|
24
|
+
*/
|
|
25
|
+
timezone: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {TimeBucket}
|
|
29
|
+
* @memberof RunTimeseriesResponse
|
|
30
|
+
*/
|
|
31
|
+
bucket: TimeBucket;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Array<TimeseriesPoint>}
|
|
35
|
+
* @memberof RunTimeseriesResponse
|
|
36
|
+
*/
|
|
37
|
+
points?: Array<TimeseriesPoint>;
|
|
38
|
+
}
|
|
39
|
+
export declare const RunTimeseriesResponsePropertyValidationAttributesMap: {
|
|
40
|
+
[property: string]: {
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
minLength?: number;
|
|
43
|
+
pattern?: string;
|
|
44
|
+
maximum?: number;
|
|
45
|
+
exclusiveMaximum?: boolean;
|
|
46
|
+
minimum?: number;
|
|
47
|
+
exclusiveMinimum?: boolean;
|
|
48
|
+
multipleOf?: number;
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
minItems?: number;
|
|
51
|
+
uniqueItems?: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the RunTimeseriesResponse interface.
|
|
56
|
+
*/
|
|
57
|
+
export declare function instanceOfRunTimeseriesResponse(value: object): value is RunTimeseriesResponse;
|
|
58
|
+
export declare function RunTimeseriesResponseFromJSON(json: any): RunTimeseriesResponse;
|
|
59
|
+
export declare function RunTimeseriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RunTimeseriesResponse;
|
|
60
|
+
export declare function RunTimeseriesResponseToJSON(json: any): RunTimeseriesResponse;
|
|
61
|
+
export declare function RunTimeseriesResponseToJSONTyped(value?: RunTimeseriesResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RunTimeseriesResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfRunTimeseriesResponse = instanceOfRunTimeseriesResponse;
|
|
18
|
+
exports.RunTimeseriesResponseFromJSON = RunTimeseriesResponseFromJSON;
|
|
19
|
+
exports.RunTimeseriesResponseFromJSONTyped = RunTimeseriesResponseFromJSONTyped;
|
|
20
|
+
exports.RunTimeseriesResponseToJSON = RunTimeseriesResponseToJSON;
|
|
21
|
+
exports.RunTimeseriesResponseToJSONTyped = RunTimeseriesResponseToJSONTyped;
|
|
22
|
+
const TimeseriesPoint_1 = require("./TimeseriesPoint");
|
|
23
|
+
const TimeBucket_1 = require("./TimeBucket");
|
|
24
|
+
exports.RunTimeseriesResponsePropertyValidationAttributesMap = {};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the RunTimeseriesResponse interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfRunTimeseriesResponse(value) {
|
|
29
|
+
if (!('timezone' in value) || value['timezone'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('bucket' in value) || value['bucket'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function RunTimeseriesResponseFromJSON(json) {
|
|
36
|
+
return RunTimeseriesResponseFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function RunTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'timezone': json['timezone'],
|
|
44
|
+
'bucket': (0, TimeBucket_1.TimeBucketFromJSON)(json['bucket']),
|
|
45
|
+
'points': json['points'] == null ? undefined : (json['points'].map(TimeseriesPoint_1.TimeseriesPointFromJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function RunTimeseriesResponseToJSON(json) {
|
|
49
|
+
return RunTimeseriesResponseToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function RunTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'timezone': value['timezone'],
|
|
57
|
+
'bucket': (0, TimeBucket_1.TimeBucketToJSON)(value['bucket']),
|
|
58
|
+
'points': value['points'] == null ? undefined : (value['points'].map(TimeseriesPoint_1.TimeseriesPointToJSON)),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
* Granularity for a bucketed time series.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const TimeBucket: {
|
|
17
|
+
readonly Hour: 'hour';
|
|
18
|
+
readonly Day: 'day';
|
|
19
|
+
readonly Week: 'week';
|
|
20
|
+
readonly Month: 'month';
|
|
21
|
+
};
|
|
22
|
+
export type TimeBucket = typeof TimeBucket[keyof typeof TimeBucket];
|
|
23
|
+
export declare function instanceOfTimeBucket(value: any): boolean;
|
|
24
|
+
export declare function TimeBucketFromJSON(json: any): TimeBucket;
|
|
25
|
+
export declare function TimeBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeBucket;
|
|
26
|
+
export declare function TimeBucketToJSON(value?: TimeBucket | null): any;
|
|
27
|
+
export declare function TimeBucketToJSONTyped(value: any, ignoreDiscriminator: boolean): TimeBucket;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TimeBucket = void 0;
|
|
17
|
+
exports.instanceOfTimeBucket = instanceOfTimeBucket;
|
|
18
|
+
exports.TimeBucketFromJSON = TimeBucketFromJSON;
|
|
19
|
+
exports.TimeBucketFromJSONTyped = TimeBucketFromJSONTyped;
|
|
20
|
+
exports.TimeBucketToJSON = TimeBucketToJSON;
|
|
21
|
+
exports.TimeBucketToJSONTyped = TimeBucketToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Granularity for a bucketed time series.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.TimeBucket = {
|
|
27
|
+
Hour: 'hour',
|
|
28
|
+
Day: 'day',
|
|
29
|
+
Week: 'week',
|
|
30
|
+
Month: 'month'
|
|
31
|
+
};
|
|
32
|
+
function instanceOfTimeBucket(value) {
|
|
33
|
+
for (const key in exports.TimeBucket) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(exports.TimeBucket, key)) {
|
|
35
|
+
if (exports.TimeBucket[key] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function TimeBucketFromJSON(json) {
|
|
43
|
+
return TimeBucketFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function TimeBucketFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
function TimeBucketToJSON(value) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function TimeBucketToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One bucket of a time series.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface TimeseriesPoint
|
|
16
|
+
*/
|
|
17
|
+
export interface TimeseriesPoint {
|
|
18
|
+
/**
|
|
19
|
+
* Start of the bucket, in the resolved timezone.
|
|
20
|
+
* @type {Date}
|
|
21
|
+
* @memberof TimeseriesPoint
|
|
22
|
+
*/
|
|
23
|
+
bucketStart: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Row count in this bucket.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof TimeseriesPoint
|
|
28
|
+
*/
|
|
29
|
+
count: number;
|
|
30
|
+
}
|
|
31
|
+
export declare const TimeseriesPointPropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the TimeseriesPoint interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfTimeseriesPoint(value: object): value is TimeseriesPoint;
|
|
50
|
+
export declare function TimeseriesPointFromJSON(json: any): TimeseriesPoint;
|
|
51
|
+
export declare function TimeseriesPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimeseriesPoint;
|
|
52
|
+
export declare function TimeseriesPointToJSON(json: any): TimeseriesPoint;
|
|
53
|
+
export declare function TimeseriesPointToJSONTyped(value?: TimeseriesPoint | null, ignoreDiscriminator?: boolean): any;
|