@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,65 @@
|
|
|
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
|
+
* Average output-document count for one workflow definition.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface DefinitionOutputStat
|
|
16
|
+
*/
|
|
17
|
+
export interface DefinitionOutputStat {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof DefinitionOutputStat
|
|
22
|
+
*/
|
|
23
|
+
definitionId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof DefinitionOutputStat
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* COMPLETED runs in the window.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof DefinitionOutputStat
|
|
34
|
+
*/
|
|
35
|
+
completedRuns: number;
|
|
36
|
+
/**
|
|
37
|
+
* Mean output DOCUMENTs generated per completed run.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof DefinitionOutputStat
|
|
40
|
+
*/
|
|
41
|
+
avgDocuments: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const DefinitionOutputStatPropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the DefinitionOutputStat interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfDefinitionOutputStat(value: object): value is DefinitionOutputStat;
|
|
62
|
+
export declare function DefinitionOutputStatFromJSON(json: any): DefinitionOutputStat;
|
|
63
|
+
export declare function DefinitionOutputStatFromJSONTyped(json: any, ignoreDiscriminator: boolean): DefinitionOutputStat;
|
|
64
|
+
export declare function DefinitionOutputStatToJSON(json: any): DefinitionOutputStat;
|
|
65
|
+
export declare function DefinitionOutputStatToJSONTyped(value?: DefinitionOutputStat | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.DefinitionOutputStatPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfDefinitionOutputStat = instanceOfDefinitionOutputStat;
|
|
18
|
+
exports.DefinitionOutputStatFromJSON = DefinitionOutputStatFromJSON;
|
|
19
|
+
exports.DefinitionOutputStatFromJSONTyped = DefinitionOutputStatFromJSONTyped;
|
|
20
|
+
exports.DefinitionOutputStatToJSON = DefinitionOutputStatToJSON;
|
|
21
|
+
exports.DefinitionOutputStatToJSONTyped = DefinitionOutputStatToJSONTyped;
|
|
22
|
+
exports.DefinitionOutputStatPropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the DefinitionOutputStat interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfDefinitionOutputStat(value) {
|
|
27
|
+
if (!('definitionId' in value) || value['definitionId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('completedRuns' in value) || value['completedRuns'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('avgDocuments' in value) || value['avgDocuments'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function DefinitionOutputStatFromJSON(json) {
|
|
38
|
+
return DefinitionOutputStatFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function DefinitionOutputStatFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'definitionId': json['definition_id'],
|
|
46
|
+
'name': json['name'],
|
|
47
|
+
'completedRuns': json['completed_runs'],
|
|
48
|
+
'avgDocuments': json['avg_documents'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function DefinitionOutputStatToJSON(json) {
|
|
52
|
+
return DefinitionOutputStatToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function DefinitionOutputStatToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'definition_id': value['definitionId'],
|
|
60
|
+
'name': value['name'],
|
|
61
|
+
'completed_runs': value['completedRuns'],
|
|
62
|
+
'avg_documents': value['avgDocuments'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -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
|
+
* Workflow runs by hour-of-day (0-23) in the resolved timezone.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface HourHistogramResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface HourHistogramResponse {
|
|
18
|
+
/**
|
|
19
|
+
* IANA timezone the hours are in.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof HourHistogramResponse
|
|
22
|
+
*/
|
|
23
|
+
timezone: string;
|
|
24
|
+
/**
|
|
25
|
+
* Exactly 24 entries; index i is the run count for hour i.
|
|
26
|
+
* @type {Array<number>}
|
|
27
|
+
* @memberof HourHistogramResponse
|
|
28
|
+
*/
|
|
29
|
+
countsByHour: Array<number>;
|
|
30
|
+
}
|
|
31
|
+
export declare const HourHistogramResponsePropertyValidationAttributesMap: {
|
|
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 HourHistogramResponse interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfHourHistogramResponse(value: object): value is HourHistogramResponse;
|
|
50
|
+
export declare function HourHistogramResponseFromJSON(json: any): HourHistogramResponse;
|
|
51
|
+
export declare function HourHistogramResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HourHistogramResponse;
|
|
52
|
+
export declare function HourHistogramResponseToJSON(json: any): HourHistogramResponse;
|
|
53
|
+
export declare function HourHistogramResponseToJSONTyped(value?: HourHistogramResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.HourHistogramResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfHourHistogramResponse = instanceOfHourHistogramResponse;
|
|
18
|
+
exports.HourHistogramResponseFromJSON = HourHistogramResponseFromJSON;
|
|
19
|
+
exports.HourHistogramResponseFromJSONTyped = HourHistogramResponseFromJSONTyped;
|
|
20
|
+
exports.HourHistogramResponseToJSON = HourHistogramResponseToJSON;
|
|
21
|
+
exports.HourHistogramResponseToJSONTyped = HourHistogramResponseToJSONTyped;
|
|
22
|
+
exports.HourHistogramResponsePropertyValidationAttributesMap = {
|
|
23
|
+
countsByHour: {
|
|
24
|
+
maxItems: 24,
|
|
25
|
+
minItems: 24,
|
|
26
|
+
uniqueItems: false,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the HourHistogramResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfHourHistogramResponse(value) {
|
|
33
|
+
if (!('timezone' in value) || value['timezone'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('countsByHour' in value) || value['countsByHour'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function HourHistogramResponseFromJSON(json) {
|
|
40
|
+
return HourHistogramResponseFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function HourHistogramResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'timezone': json['timezone'],
|
|
48
|
+
'countsByHour': json['counts_by_hour'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function HourHistogramResponseToJSON(json) {
|
|
52
|
+
return HourHistogramResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function HourHistogramResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'timezone': value['timezone'],
|
|
60
|
+
'counts_by_hour': value['countsByHour'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A knowledge-base time series the dashboard can request.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const KbMetric: {
|
|
17
|
+
readonly DocumentUploads: 'document_uploads';
|
|
18
|
+
readonly IngestionCompleted: 'ingestion_completed';
|
|
19
|
+
readonly IngestionFailed: 'ingestion_failed';
|
|
20
|
+
};
|
|
21
|
+
export type KbMetric = typeof KbMetric[keyof typeof KbMetric];
|
|
22
|
+
export declare function instanceOfKbMetric(value: any): boolean;
|
|
23
|
+
export declare function KbMetricFromJSON(json: any): KbMetric;
|
|
24
|
+
export declare function KbMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): KbMetric;
|
|
25
|
+
export declare function KbMetricToJSON(value?: KbMetric | null): any;
|
|
26
|
+
export declare function KbMetricToJSONTyped(value: any, ignoreDiscriminator: boolean): KbMetric;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.KbMetric = void 0;
|
|
17
|
+
exports.instanceOfKbMetric = instanceOfKbMetric;
|
|
18
|
+
exports.KbMetricFromJSON = KbMetricFromJSON;
|
|
19
|
+
exports.KbMetricFromJSONTyped = KbMetricFromJSONTyped;
|
|
20
|
+
exports.KbMetricToJSON = KbMetricToJSON;
|
|
21
|
+
exports.KbMetricToJSONTyped = KbMetricToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* A knowledge-base time series the dashboard can request.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.KbMetric = {
|
|
27
|
+
DocumentUploads: 'document_uploads',
|
|
28
|
+
IngestionCompleted: 'ingestion_completed',
|
|
29
|
+
IngestionFailed: 'ingestion_failed'
|
|
30
|
+
};
|
|
31
|
+
function instanceOfKbMetric(value) {
|
|
32
|
+
for (const key in exports.KbMetric) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(exports.KbMetric, key)) {
|
|
34
|
+
if (exports.KbMetric[key] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function KbMetricFromJSON(json) {
|
|
42
|
+
return KbMetricFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function KbMetricFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
function KbMetricToJSON(value) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
function KbMetricToJSONTyped(value, ignoreDiscriminator) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
@@ -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,117 @@
|
|
|
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.KbSummaryResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfKbSummaryResponse = instanceOfKbSummaryResponse;
|
|
18
|
+
exports.KbSummaryResponseFromJSON = KbSummaryResponseFromJSON;
|
|
19
|
+
exports.KbSummaryResponseFromJSONTyped = KbSummaryResponseFromJSONTyped;
|
|
20
|
+
exports.KbSummaryResponseToJSON = KbSummaryResponseToJSON;
|
|
21
|
+
exports.KbSummaryResponseToJSONTyped = KbSummaryResponseToJSONTyped;
|
|
22
|
+
const MeteredQuotaStatus_1 = require("./MeteredQuotaStatus");
|
|
23
|
+
exports.KbSummaryResponsePropertyValidationAttributesMap = {};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the KbSummaryResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfKbSummaryResponse(value) {
|
|
28
|
+
if (!('documentsTotal' in value) || value['documentsTotal'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('documentsByOrigin' in value) || value['documentsByOrigin'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('documentsByType' in value) || value['documentsByType'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('documentVersionsTotal' in value) || value['documentVersionsTotal'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('chunksTotal' in value) || value['chunksTotal'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('chunksByType' in value) || value['chunksByType'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('tokensTotal' in value) || value['tokensTotal'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('sectionsTotal' in value) || value['sectionsTotal'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('threadsTotal' in value) || value['threadsTotal'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('messagesTotal' in value) || value['messagesTotal'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('messagesByRole' in value) || value['messagesByRole'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('dataSourcesTotal' in value) || value['dataSourcesTotal'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (!('dataSourceTablesTotal' in value) || value['dataSourceTablesTotal'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('documentsCheckedOut' in value) || value['documentsCheckedOut'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if (!('quota' in value) || value['quota'] === undefined)
|
|
57
|
+
return false;
|
|
58
|
+
if (!('feedbackUp' in value) || value['feedbackUp'] === undefined)
|
|
59
|
+
return false;
|
|
60
|
+
if (!('feedbackDown' in value) || value['feedbackDown'] === undefined)
|
|
61
|
+
return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
function KbSummaryResponseFromJSON(json) {
|
|
65
|
+
return KbSummaryResponseFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
function KbSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'documentsTotal': json['documents_total'],
|
|
73
|
+
'documentsByOrigin': json['documents_by_origin'],
|
|
74
|
+
'documentsByType': json['documents_by_type'],
|
|
75
|
+
'documentVersionsTotal': json['document_versions_total'],
|
|
76
|
+
'chunksTotal': json['chunks_total'],
|
|
77
|
+
'chunksByType': json['chunks_by_type'],
|
|
78
|
+
'tokensTotal': json['tokens_total'],
|
|
79
|
+
'sectionsTotal': json['sections_total'],
|
|
80
|
+
'threadsTotal': json['threads_total'],
|
|
81
|
+
'messagesTotal': json['messages_total'],
|
|
82
|
+
'messagesByRole': json['messages_by_role'],
|
|
83
|
+
'dataSourcesTotal': json['data_sources_total'],
|
|
84
|
+
'dataSourceTablesTotal': json['data_source_tables_total'],
|
|
85
|
+
'documentsCheckedOut': json['documents_checked_out'],
|
|
86
|
+
'quota': (json['quota'].map(MeteredQuotaStatus_1.MeteredQuotaStatusFromJSON)),
|
|
87
|
+
'feedbackUp': json['feedback_up'],
|
|
88
|
+
'feedbackDown': json['feedback_down'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function KbSummaryResponseToJSON(json) {
|
|
92
|
+
return KbSummaryResponseToJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
function KbSummaryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
'documents_total': value['documentsTotal'],
|
|
100
|
+
'documents_by_origin': value['documentsByOrigin'],
|
|
101
|
+
'documents_by_type': value['documentsByType'],
|
|
102
|
+
'document_versions_total': value['documentVersionsTotal'],
|
|
103
|
+
'chunks_total': value['chunksTotal'],
|
|
104
|
+
'chunks_by_type': value['chunksByType'],
|
|
105
|
+
'tokens_total': value['tokensTotal'],
|
|
106
|
+
'sections_total': value['sectionsTotal'],
|
|
107
|
+
'threads_total': value['threadsTotal'],
|
|
108
|
+
'messages_total': value['messagesTotal'],
|
|
109
|
+
'messages_by_role': value['messagesByRole'],
|
|
110
|
+
'data_sources_total': value['dataSourcesTotal'],
|
|
111
|
+
'data_source_tables_total': value['dataSourceTablesTotal'],
|
|
112
|
+
'documents_checked_out': value['documentsCheckedOut'],
|
|
113
|
+
'quota': (value['quota'].map(MeteredQuotaStatus_1.MeteredQuotaStatusToJSON)),
|
|
114
|
+
'feedback_up': value['feedbackUp'],
|
|
115
|
+
'feedback_down': value['feedbackDown'],
|
|
116
|
+
};
|
|
117
|
+
}
|