@knowledge-stack/ksapi 1.139.0 → 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.
Files changed (110) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/README.md +25 -11
  3. package/dist/apis/AdminKbApi.d.ts +109 -0
  4. package/dist/apis/AdminKbApi.js +172 -0
  5. package/dist/apis/AdminWorkflowsApi.d.ts +252 -0
  6. package/dist/apis/AdminWorkflowsApi.js +337 -0
  7. package/dist/apis/SkillsApi.d.ts +4 -4
  8. package/dist/apis/SkillsApi.js +2 -2
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/esm/apis/AdminKbApi.d.ts +109 -0
  12. package/dist/esm/apis/AdminKbApi.js +135 -0
  13. package/dist/esm/apis/AdminWorkflowsApi.d.ts +252 -0
  14. package/dist/esm/apis/AdminWorkflowsApi.js +300 -0
  15. package/dist/esm/apis/SkillsApi.d.ts +4 -4
  16. package/dist/esm/apis/SkillsApi.js +2 -2
  17. package/dist/esm/apis/index.d.ts +2 -0
  18. package/dist/esm/apis/index.js +2 -0
  19. package/dist/esm/models/DefinitionOutputStat.d.ts +65 -0
  20. package/dist/esm/models/DefinitionOutputStat.js +56 -0
  21. package/dist/esm/models/HourHistogramResponse.d.ts +53 -0
  22. package/dist/esm/models/HourHistogramResponse.js +54 -0
  23. package/dist/esm/models/KbMetric.d.ts +26 -0
  24. package/dist/esm/models/KbMetric.js +44 -0
  25. package/dist/esm/models/KbSummaryResponse.d.ts +152 -0
  26. package/dist/esm/models/KbSummaryResponse.js +109 -0
  27. package/dist/esm/models/KbTimeseriesResponse.d.ts +71 -0
  28. package/dist/esm/models/KbTimeseriesResponse.js +57 -0
  29. package/dist/esm/models/LabeledSeries.d.ts +54 -0
  30. package/dist/esm/models/LabeledSeries.js +47 -0
  31. package/dist/esm/models/LeaderboardEntry.d.ts +59 -0
  32. package/dist/esm/models/LeaderboardEntry.js +52 -0
  33. package/dist/esm/models/RunTimeseriesResponse.d.ts +61 -0
  34. package/dist/esm/models/RunTimeseriesResponse.js +52 -0
  35. package/dist/esm/models/SkillResponse.d.ts +7 -0
  36. package/dist/esm/models/SkillResponse.js +3 -0
  37. package/dist/esm/models/TimeBucket.d.ts +27 -0
  38. package/dist/esm/models/TimeBucket.js +45 -0
  39. package/dist/esm/models/TimeseriesPoint.d.ts +53 -0
  40. package/dist/esm/models/TimeseriesPoint.js +48 -0
  41. package/dist/esm/models/WorkflowLeaderboardResponse.d.ts +54 -0
  42. package/dist/esm/models/WorkflowLeaderboardResponse.js +45 -0
  43. package/dist/esm/models/WorkflowOutputStatsResponse.d.ts +54 -0
  44. package/dist/esm/models/WorkflowOutputStatsResponse.js +47 -0
  45. package/dist/esm/models/index.d.ts +12 -0
  46. package/dist/esm/models/index.js +12 -0
  47. package/dist/models/DefinitionOutputStat.d.ts +65 -0
  48. package/dist/models/DefinitionOutputStat.js +64 -0
  49. package/dist/models/HourHistogramResponse.d.ts +53 -0
  50. package/dist/models/HourHistogramResponse.js +62 -0
  51. package/dist/models/KbMetric.d.ts +26 -0
  52. package/dist/models/KbMetric.js +52 -0
  53. package/dist/models/KbSummaryResponse.d.ts +152 -0
  54. package/dist/models/KbSummaryResponse.js +117 -0
  55. package/dist/models/KbTimeseriesResponse.d.ts +71 -0
  56. package/dist/models/KbTimeseriesResponse.js +65 -0
  57. package/dist/models/LabeledSeries.d.ts +54 -0
  58. package/dist/models/LabeledSeries.js +55 -0
  59. package/dist/models/LeaderboardEntry.d.ts +59 -0
  60. package/dist/models/LeaderboardEntry.js +60 -0
  61. package/dist/models/RunTimeseriesResponse.d.ts +61 -0
  62. package/dist/models/RunTimeseriesResponse.js +60 -0
  63. package/dist/models/SkillResponse.d.ts +7 -0
  64. package/dist/models/SkillResponse.js +3 -0
  65. package/dist/models/TimeBucket.d.ts +27 -0
  66. package/dist/models/TimeBucket.js +53 -0
  67. package/dist/models/TimeseriesPoint.d.ts +53 -0
  68. package/dist/models/TimeseriesPoint.js +56 -0
  69. package/dist/models/WorkflowLeaderboardResponse.d.ts +54 -0
  70. package/dist/models/WorkflowLeaderboardResponse.js +53 -0
  71. package/dist/models/WorkflowOutputStatsResponse.d.ts +54 -0
  72. package/dist/models/WorkflowOutputStatsResponse.js +55 -0
  73. package/dist/models/index.d.ts +12 -0
  74. package/dist/models/index.js +12 -0
  75. package/docs/AdminKbApi.md +163 -0
  76. package/docs/AdminWorkflowsApi.md +424 -0
  77. package/docs/DefinitionOutputStat.md +41 -0
  78. package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +2 -0
  79. package/docs/HourHistogramResponse.md +37 -0
  80. package/docs/KbMetric.md +33 -0
  81. package/docs/KbSummaryResponse.md +67 -0
  82. package/docs/KbTimeseriesResponse.md +41 -0
  83. package/docs/LabeledSeries.md +37 -0
  84. package/docs/LeaderboardEntry.md +39 -0
  85. package/docs/RunTimeseriesResponse.md +39 -0
  86. package/docs/SkillResponse.md +2 -0
  87. package/docs/SkillsApi.md +1 -1
  88. package/docs/TimeBucket.md +33 -0
  89. package/docs/TimeseriesPoint.md +37 -0
  90. package/docs/WorkflowLeaderboardResponse.md +37 -0
  91. package/docs/WorkflowOutputStatsResponse.md +37 -0
  92. package/package.json +1 -1
  93. package/src/apis/AdminKbApi.ts +237 -0
  94. package/src/apis/AdminWorkflowsApi.ts +539 -0
  95. package/src/apis/SkillsApi.ts +4 -4
  96. package/src/apis/index.ts +2 -0
  97. package/src/models/DefinitionOutputStat.ts +110 -0
  98. package/src/models/HourHistogramResponse.ts +97 -0
  99. package/src/models/KbMetric.ts +54 -0
  100. package/src/models/KbSummaryResponse.ts +235 -0
  101. package/src/models/KbTimeseriesResponse.ts +136 -0
  102. package/src/models/LabeledSeries.ts +99 -0
  103. package/src/models/LeaderboardEntry.ts +101 -0
  104. package/src/models/RunTimeseriesResponse.ts +117 -0
  105. package/src/models/SkillResponse.ts +15 -0
  106. package/src/models/TimeBucket.ts +55 -0
  107. package/src/models/TimeseriesPoint.ts +92 -0
  108. package/src/models/WorkflowLeaderboardResponse.ts +98 -0
  109. package/src/models/WorkflowOutputStatsResponse.ts +99 -0
  110. package/src/models/index.ts +12 -0
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export const LeaderboardEntryPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the LeaderboardEntry interface.
17
+ */
18
+ export function instanceOfLeaderboardEntry(value) {
19
+ if (!('id' in value) || value['id'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ if (!('count' in value) || value['count'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function LeaderboardEntryFromJSON(json) {
28
+ return LeaderboardEntryFromJSONTyped(json, false);
29
+ }
30
+ export function LeaderboardEntryFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'id': json['id'],
36
+ 'name': json['name'],
37
+ 'count': json['count'],
38
+ };
39
+ }
40
+ export function LeaderboardEntryToJSON(json) {
41
+ return LeaderboardEntryToJSONTyped(json, false);
42
+ }
43
+ export function LeaderboardEntryToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'id': value['id'],
49
+ 'name': value['name'],
50
+ 'count': value['count'],
51
+ };
52
+ }
@@ -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,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { TimeseriesPointFromJSON, TimeseriesPointToJSON, } from './TimeseriesPoint';
15
+ import { TimeBucketFromJSON, TimeBucketToJSON, } from './TimeBucket';
16
+ export const RunTimeseriesResponsePropertyValidationAttributesMap = {};
17
+ /**
18
+ * Check if a given object implements the RunTimeseriesResponse interface.
19
+ */
20
+ export function instanceOfRunTimeseriesResponse(value) {
21
+ if (!('timezone' in value) || value['timezone'] === undefined)
22
+ return false;
23
+ if (!('bucket' in value) || value['bucket'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function RunTimeseriesResponseFromJSON(json) {
28
+ return RunTimeseriesResponseFromJSONTyped(json, false);
29
+ }
30
+ export function RunTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'timezone': json['timezone'],
36
+ 'bucket': TimeBucketFromJSON(json['bucket']),
37
+ 'points': json['points'] == null ? undefined : (json['points'].map(TimeseriesPointFromJSON)),
38
+ };
39
+ }
40
+ export function RunTimeseriesResponseToJSON(json) {
41
+ return RunTimeseriesResponseToJSONTyped(json, false);
42
+ }
43
+ export function RunTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'timezone': value['timezone'],
49
+ 'bucket': TimeBucketToJSON(value['bucket']),
50
+ 'points': value['points'] == null ? undefined : (value['points'].map(TimeseriesPointToJSON)),
51
+ };
52
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { ItemPermissions } from './ItemPermissions';
13
+ import type { SkillScriptFile } from './SkillScriptFile';
13
14
  import type { PathPartApprovalState } from './PathPartApprovalState';
14
15
  import type { UserInfo } from './UserInfo';
15
16
  /**
@@ -78,6 +79,12 @@ export interface SkillResponse {
78
79
  * @memberof SkillResponse
79
80
  */
80
81
  scriptNames?: Array<string>;
82
+ /**
83
+ * Bundled scripts with their contents; populated only on the detail read (GET /skills/{id}), null on list. Lets the editor read the current script set so a PATCH can safely resubmit the whole set.
84
+ * @type {Array<SkillScriptFile>}
85
+ * @memberof SkillResponse
86
+ */
87
+ scripts?: Array<SkillScriptFile> | null;
81
88
  /**
82
89
  * Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
83
90
  * @type {boolean}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
15
+ import { SkillScriptFileFromJSON, SkillScriptFileToJSON, } from './SkillScriptFile';
15
16
  import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
16
17
  import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
17
18
  /**
@@ -65,6 +66,7 @@ export function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
65
66
  'description': json['description'],
66
67
  'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
67
68
  'scriptNames': json['script_names'] == null ? undefined : json['script_names'],
69
+ 'scripts': json['scripts'] == null ? undefined : (json['scripts'].map(SkillScriptFileFromJSON)),
68
70
  'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
69
71
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
70
72
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
@@ -91,6 +93,7 @@ export function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
91
93
  'description': value['description'],
92
94
  'skill_md': value['skillMd'],
93
95
  'script_names': value['scriptNames'],
96
+ 'scripts': value['scripts'] == null ? undefined : (value['scripts'].map(SkillScriptFileToJSON)),
94
97
  'has_unpublished_changes': value['hasUnpublishedChanges'],
95
98
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
96
99
  'owner': UserInfoToJSON(value['owner']),
@@ -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,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Granularity for a bucketed time series.
16
+ * @export
17
+ */
18
+ export const TimeBucket = {
19
+ Hour: 'hour',
20
+ Day: 'day',
21
+ Week: 'week',
22
+ Month: 'month'
23
+ };
24
+ export function instanceOfTimeBucket(value) {
25
+ for (const key in TimeBucket) {
26
+ if (Object.prototype.hasOwnProperty.call(TimeBucket, key)) {
27
+ if (TimeBucket[key] === value) {
28
+ return true;
29
+ }
30
+ }
31
+ }
32
+ return false;
33
+ }
34
+ export function TimeBucketFromJSON(json) {
35
+ return TimeBucketFromJSONTyped(json, false);
36
+ }
37
+ export function TimeBucketFromJSONTyped(json, ignoreDiscriminator) {
38
+ return json;
39
+ }
40
+ export function TimeBucketToJSON(value) {
41
+ return value;
42
+ }
43
+ export function TimeBucketToJSONTyped(value, ignoreDiscriminator) {
44
+ return value;
45
+ }
@@ -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;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export const TimeseriesPointPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the TimeseriesPoint interface.
17
+ */
18
+ export function instanceOfTimeseriesPoint(value) {
19
+ if (!('bucketStart' in value) || value['bucketStart'] === undefined)
20
+ return false;
21
+ if (!('count' in value) || value['count'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function TimeseriesPointFromJSON(json) {
26
+ return TimeseriesPointFromJSONTyped(json, false);
27
+ }
28
+ export function TimeseriesPointFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'bucketStart': (new Date(json['bucket_start'])),
34
+ 'count': json['count'],
35
+ };
36
+ }
37
+ export function TimeseriesPointToJSON(json) {
38
+ return TimeseriesPointToJSONTyped(json, false);
39
+ }
40
+ export function TimeseriesPointToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'bucket_start': value['bucketStart'].toISOString(),
46
+ 'count': value['count'],
47
+ };
48
+ }
@@ -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 { LeaderboardEntry } from './LeaderboardEntry';
13
+ /**
14
+ * Top workflows and top users by run count over a window.
15
+ * @export
16
+ * @interface WorkflowLeaderboardResponse
17
+ */
18
+ export interface WorkflowLeaderboardResponse {
19
+ /**
20
+ *
21
+ * @type {Array<LeaderboardEntry>}
22
+ * @memberof WorkflowLeaderboardResponse
23
+ */
24
+ topWorkflows?: Array<LeaderboardEntry>;
25
+ /**
26
+ *
27
+ * @type {Array<LeaderboardEntry>}
28
+ * @memberof WorkflowLeaderboardResponse
29
+ */
30
+ topUsers?: Array<LeaderboardEntry>;
31
+ }
32
+ export declare const WorkflowLeaderboardResponsePropertyValidationAttributesMap: {
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 WorkflowLeaderboardResponse interface.
49
+ */
50
+ export declare function instanceOfWorkflowLeaderboardResponse(value: object): value is WorkflowLeaderboardResponse;
51
+ export declare function WorkflowLeaderboardResponseFromJSON(json: any): WorkflowLeaderboardResponse;
52
+ export declare function WorkflowLeaderboardResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowLeaderboardResponse;
53
+ export declare function WorkflowLeaderboardResponseToJSON(json: any): WorkflowLeaderboardResponse;
54
+ export declare function WorkflowLeaderboardResponseToJSONTyped(value?: WorkflowLeaderboardResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,45 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { LeaderboardEntryFromJSON, LeaderboardEntryToJSON, } from './LeaderboardEntry';
15
+ export const WorkflowLeaderboardResponsePropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the WorkflowLeaderboardResponse interface.
18
+ */
19
+ export function instanceOfWorkflowLeaderboardResponse(value) {
20
+ return true;
21
+ }
22
+ export function WorkflowLeaderboardResponseFromJSON(json) {
23
+ return WorkflowLeaderboardResponseFromJSONTyped(json, false);
24
+ }
25
+ export function WorkflowLeaderboardResponseFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'topWorkflows': json['top_workflows'] == null ? undefined : (json['top_workflows'].map(LeaderboardEntryFromJSON)),
31
+ 'topUsers': json['top_users'] == null ? undefined : (json['top_users'].map(LeaderboardEntryFromJSON)),
32
+ };
33
+ }
34
+ export function WorkflowLeaderboardResponseToJSON(json) {
35
+ return WorkflowLeaderboardResponseToJSONTyped(json, false);
36
+ }
37
+ export function WorkflowLeaderboardResponseToJSONTyped(value, ignoreDiscriminator = false) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'top_workflows': value['topWorkflows'] == null ? undefined : (value['topWorkflows'].map(LeaderboardEntryToJSON)),
43
+ 'top_users': value['topUsers'] == null ? undefined : (value['topUsers'].map(LeaderboardEntryToJSON)),
44
+ };
45
+ }
@@ -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 { DefinitionOutputStat } from './DefinitionOutputStat';
13
+ /**
14
+ * Avg documents generated per workflow definition (completed runs).
15
+ * @export
16
+ * @interface WorkflowOutputStatsResponse
17
+ */
18
+ export interface WorkflowOutputStatsResponse {
19
+ /**
20
+ *
21
+ * @type {Array<DefinitionOutputStat>}
22
+ * @memberof WorkflowOutputStatsResponse
23
+ */
24
+ perDefinition?: Array<DefinitionOutputStat>;
25
+ /**
26
+ * Mean output DOCUMENTs across all completed runs; null when none.
27
+ * @type {number}
28
+ * @memberof WorkflowOutputStatsResponse
29
+ */
30
+ overallAvg: number | null;
31
+ }
32
+ export declare const WorkflowOutputStatsResponsePropertyValidationAttributesMap: {
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 WorkflowOutputStatsResponse interface.
49
+ */
50
+ export declare function instanceOfWorkflowOutputStatsResponse(value: object): value is WorkflowOutputStatsResponse;
51
+ export declare function WorkflowOutputStatsResponseFromJSON(json: any): WorkflowOutputStatsResponse;
52
+ export declare function WorkflowOutputStatsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkflowOutputStatsResponse;
53
+ export declare function WorkflowOutputStatsResponseToJSON(json: any): WorkflowOutputStatsResponse;
54
+ export declare function WorkflowOutputStatsResponseToJSONTyped(value?: WorkflowOutputStatsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { DefinitionOutputStatFromJSON, DefinitionOutputStatToJSON, } from './DefinitionOutputStat';
15
+ export const WorkflowOutputStatsResponsePropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the WorkflowOutputStatsResponse interface.
18
+ */
19
+ export function instanceOfWorkflowOutputStatsResponse(value) {
20
+ if (!('overallAvg' in value) || value['overallAvg'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function WorkflowOutputStatsResponseFromJSON(json) {
25
+ return WorkflowOutputStatsResponseFromJSONTyped(json, false);
26
+ }
27
+ export function WorkflowOutputStatsResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'perDefinition': json['per_definition'] == null ? undefined : (json['per_definition'].map(DefinitionOutputStatFromJSON)),
33
+ 'overallAvg': json['overall_avg'],
34
+ };
35
+ }
36
+ export function WorkflowOutputStatsResponseToJSON(json) {
37
+ return WorkflowOutputStatsResponseToJSONTyped(json, false);
38
+ }
39
+ export function WorkflowOutputStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'per_definition': value['perDefinition'] == null ? undefined : (value['perDefinition'].map(DefinitionOutputStatToJSON)),
45
+ 'overall_avg': value['overallAvg'],
46
+ };
47
+ }