@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,300 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { HourHistogramResponseFromJSON, RunTimeseriesResponseFromJSON, WorkflowLeaderboardResponseFromJSON, WorkflowOutputStatsResponseFromJSON, WorkflowRunSummaryResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class AdminWorkflowsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for getAdminWorkflowByHour without sending the request
31
+ */
32
+ getAdminWorkflowByHourRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ if (requestParameters['since'] != null) {
36
+ queryParameters['since'] = requestParameters['since'].toISOString();
37
+ }
38
+ if (requestParameters['until'] != null) {
39
+ queryParameters['until'] = requestParameters['until'].toISOString();
40
+ }
41
+ if (requestParameters['timezone'] != null) {
42
+ queryParameters['timezone'] = requestParameters['timezone'];
43
+ }
44
+ if (requestParameters['definitionId'] != null) {
45
+ queryParameters['definition_id'] = requestParameters['definitionId'];
46
+ }
47
+ const headerParameters = {};
48
+ if (this.configuration && this.configuration.accessToken) {
49
+ const token = this.configuration.accessToken;
50
+ const tokenString = yield token("bearerAuth", []);
51
+ if (tokenString) {
52
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
53
+ }
54
+ }
55
+ let urlPath = `/v1/admin/workflows/by-hour`;
56
+ return {
57
+ path: urlPath,
58
+ method: 'GET',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ };
62
+ });
63
+ }
64
+ /**
65
+ * Runs per hour-of-day (0-23) in the resolved timezone.
66
+ * Get Admin Workflow By Hour Handler
67
+ */
68
+ getAdminWorkflowByHourRaw(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const requestOptions = yield this.getAdminWorkflowByHourRequestOpts(requestParameters);
71
+ const response = yield this.request(requestOptions, initOverrides);
72
+ return new runtime.JSONApiResponse(response, (jsonValue) => HourHistogramResponseFromJSON(jsonValue));
73
+ });
74
+ }
75
+ /**
76
+ * Runs per hour-of-day (0-23) in the resolved timezone.
77
+ * Get Admin Workflow By Hour Handler
78
+ */
79
+ getAdminWorkflowByHour() {
80
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
81
+ const response = yield this.getAdminWorkflowByHourRaw(requestParameters, initOverrides);
82
+ return yield response.value();
83
+ });
84
+ }
85
+ /**
86
+ * Creates request options for getAdminWorkflowLeaderboard without sending the request
87
+ */
88
+ getAdminWorkflowLeaderboardRequestOpts(requestParameters) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ const queryParameters = {};
91
+ if (requestParameters['since'] != null) {
92
+ queryParameters['since'] = requestParameters['since'].toISOString();
93
+ }
94
+ if (requestParameters['until'] != null) {
95
+ queryParameters['until'] = requestParameters['until'].toISOString();
96
+ }
97
+ if (requestParameters['limit'] != null) {
98
+ queryParameters['limit'] = requestParameters['limit'];
99
+ }
100
+ const headerParameters = {};
101
+ if (this.configuration && this.configuration.accessToken) {
102
+ const token = this.configuration.accessToken;
103
+ const tokenString = yield token("bearerAuth", []);
104
+ if (tokenString) {
105
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
106
+ }
107
+ }
108
+ let urlPath = `/v1/admin/workflows/leaderboard`;
109
+ return {
110
+ path: urlPath,
111
+ method: 'GET',
112
+ headers: headerParameters,
113
+ query: queryParameters,
114
+ };
115
+ });
116
+ }
117
+ /**
118
+ * Top workflows and top run owners by run count.
119
+ * Get Admin Workflow Leaderboard Handler
120
+ */
121
+ getAdminWorkflowLeaderboardRaw(requestParameters, initOverrides) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const requestOptions = yield this.getAdminWorkflowLeaderboardRequestOpts(requestParameters);
124
+ const response = yield this.request(requestOptions, initOverrides);
125
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowLeaderboardResponseFromJSON(jsonValue));
126
+ });
127
+ }
128
+ /**
129
+ * Top workflows and top run owners by run count.
130
+ * Get Admin Workflow Leaderboard Handler
131
+ */
132
+ getAdminWorkflowLeaderboard() {
133
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
134
+ const response = yield this.getAdminWorkflowLeaderboardRaw(requestParameters, initOverrides);
135
+ return yield response.value();
136
+ });
137
+ }
138
+ /**
139
+ * Creates request options for getAdminWorkflowOutputStats without sending the request
140
+ */
141
+ getAdminWorkflowOutputStatsRequestOpts(requestParameters) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ const queryParameters = {};
144
+ if (requestParameters['since'] != null) {
145
+ queryParameters['since'] = requestParameters['since'].toISOString();
146
+ }
147
+ if (requestParameters['until'] != null) {
148
+ queryParameters['until'] = requestParameters['until'].toISOString();
149
+ }
150
+ const headerParameters = {};
151
+ if (this.configuration && this.configuration.accessToken) {
152
+ const token = this.configuration.accessToken;
153
+ const tokenString = yield token("bearerAuth", []);
154
+ if (tokenString) {
155
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
156
+ }
157
+ }
158
+ let urlPath = `/v1/admin/workflows/output-stats`;
159
+ return {
160
+ path: urlPath,
161
+ method: 'GET',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ };
165
+ });
166
+ }
167
+ /**
168
+ * Average output DOCUMENTs generated per workflow definition (completed runs).
169
+ * Get Admin Workflow Output Stats Handler
170
+ */
171
+ getAdminWorkflowOutputStatsRaw(requestParameters, initOverrides) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const requestOptions = yield this.getAdminWorkflowOutputStatsRequestOpts(requestParameters);
174
+ const response = yield this.request(requestOptions, initOverrides);
175
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowOutputStatsResponseFromJSON(jsonValue));
176
+ });
177
+ }
178
+ /**
179
+ * Average output DOCUMENTs generated per workflow definition (completed runs).
180
+ * Get Admin Workflow Output Stats Handler
181
+ */
182
+ getAdminWorkflowOutputStats() {
183
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
184
+ const response = yield this.getAdminWorkflowOutputStatsRaw(requestParameters, initOverrides);
185
+ return yield response.value();
186
+ });
187
+ }
188
+ /**
189
+ * Creates request options for getAdminWorkflowSummary without sending the request
190
+ */
191
+ getAdminWorkflowSummaryRequestOpts(requestParameters) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const queryParameters = {};
194
+ if (requestParameters['since'] != null) {
195
+ queryParameters['since'] = requestParameters['since'].toISOString();
196
+ }
197
+ if (requestParameters['until'] != null) {
198
+ queryParameters['until'] = requestParameters['until'].toISOString();
199
+ }
200
+ if (requestParameters['definitionId'] != null) {
201
+ queryParameters['definition_id'] = requestParameters['definitionId'];
202
+ }
203
+ const headerParameters = {};
204
+ if (this.configuration && this.configuration.accessToken) {
205
+ const token = this.configuration.accessToken;
206
+ const tokenString = yield token("bearerAuth", []);
207
+ if (tokenString) {
208
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
209
+ }
210
+ }
211
+ let urlPath = `/v1/admin/workflows/summary`;
212
+ return {
213
+ path: urlPath,
214
+ method: 'GET',
215
+ headers: headerParameters,
216
+ query: queryParameters,
217
+ };
218
+ });
219
+ }
220
+ /**
221
+ * Tenant-wide run health: counts, failure rate, durations, approval backlog.
222
+ * Get Admin Workflow Summary Handler
223
+ */
224
+ getAdminWorkflowSummaryRaw(requestParameters, initOverrides) {
225
+ return __awaiter(this, void 0, void 0, function* () {
226
+ const requestOptions = yield this.getAdminWorkflowSummaryRequestOpts(requestParameters);
227
+ const response = yield this.request(requestOptions, initOverrides);
228
+ return new runtime.JSONApiResponse(response, (jsonValue) => WorkflowRunSummaryResponseFromJSON(jsonValue));
229
+ });
230
+ }
231
+ /**
232
+ * Tenant-wide run health: counts, failure rate, durations, approval backlog.
233
+ * Get Admin Workflow Summary Handler
234
+ */
235
+ getAdminWorkflowSummary() {
236
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
237
+ const response = yield this.getAdminWorkflowSummaryRaw(requestParameters, initOverrides);
238
+ return yield response.value();
239
+ });
240
+ }
241
+ /**
242
+ * Creates request options for getAdminWorkflowTimeseries without sending the request
243
+ */
244
+ getAdminWorkflowTimeseriesRequestOpts(requestParameters) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ const queryParameters = {};
247
+ if (requestParameters['since'] != null) {
248
+ queryParameters['since'] = requestParameters['since'].toISOString();
249
+ }
250
+ if (requestParameters['until'] != null) {
251
+ queryParameters['until'] = requestParameters['until'].toISOString();
252
+ }
253
+ if (requestParameters['bucket'] != null) {
254
+ queryParameters['bucket'] = requestParameters['bucket'];
255
+ }
256
+ if (requestParameters['timezone'] != null) {
257
+ queryParameters['timezone'] = requestParameters['timezone'];
258
+ }
259
+ if (requestParameters['definitionId'] != null) {
260
+ queryParameters['definition_id'] = requestParameters['definitionId'];
261
+ }
262
+ const headerParameters = {};
263
+ if (this.configuration && this.configuration.accessToken) {
264
+ const token = this.configuration.accessToken;
265
+ const tokenString = yield token("bearerAuth", []);
266
+ if (tokenString) {
267
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
268
+ }
269
+ }
270
+ let urlPath = `/v1/admin/workflows/timeseries`;
271
+ return {
272
+ path: urlPath,
273
+ method: 'GET',
274
+ headers: headerParameters,
275
+ query: queryParameters,
276
+ };
277
+ });
278
+ }
279
+ /**
280
+ * Run counts bucketed over time, in the resolved timezone.
281
+ * Get Admin Workflow Timeseries Handler
282
+ */
283
+ getAdminWorkflowTimeseriesRaw(requestParameters, initOverrides) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const requestOptions = yield this.getAdminWorkflowTimeseriesRequestOpts(requestParameters);
286
+ const response = yield this.request(requestOptions, initOverrides);
287
+ return new runtime.JSONApiResponse(response, (jsonValue) => RunTimeseriesResponseFromJSON(jsonValue));
288
+ });
289
+ }
290
+ /**
291
+ * Run counts bucketed over time, in the resolved timezone.
292
+ * Get Admin Workflow Timeseries Handler
293
+ */
294
+ getAdminWorkflowTimeseries() {
295
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
296
+ const response = yield this.getAdminWorkflowTimeseriesRaw(requestParameters, initOverrides);
297
+ return yield response.value();
298
+ });
299
+ }
300
+ }
@@ -226,7 +226,7 @@ export interface SkillsApiInterface {
226
226
  */
227
227
  getSkillRequestOpts(requestParameters: GetSkillRequest): Promise<runtime.RequestOpts>;
228
228
  /**
229
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
229
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
230
230
  * @summary Get Skill Handler
231
231
  * @param {string} skillId
232
232
  * @param {*} [options] Override http request option.
@@ -235,7 +235,7 @@ export interface SkillsApiInterface {
235
235
  */
236
236
  getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>>;
237
237
  /**
238
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
238
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
239
239
  * Get Skill Handler
240
240
  */
241
241
  getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse>;
@@ -483,12 +483,12 @@ export declare class SkillsApi extends runtime.BaseAPI implements SkillsApiInter
483
483
  */
484
484
  getSkillRequestOpts(requestParameters: GetSkillRequest): Promise<runtime.RequestOpts>;
485
485
  /**
486
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
486
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
487
487
  * Get Skill Handler
488
488
  */
489
489
  getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>>;
490
490
  /**
491
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
491
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
492
492
  * Get Skill Handler
493
493
  */
494
494
  getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse>;
@@ -403,7 +403,7 @@ export class SkillsApi extends runtime.BaseAPI {
403
403
  });
404
404
  }
405
405
  /**
406
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
406
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
407
407
  * Get Skill Handler
408
408
  */
409
409
  getSkillRaw(requestParameters, initOverrides) {
@@ -414,7 +414,7 @@ export class SkillsApi extends runtime.BaseAPI {
414
414
  });
415
415
  }
416
416
  /**
417
- * Skill detail: SKILL.md, scripts, has_unpublished_changes, permissions.
417
+ * Skill detail: SKILL.md, script contents, has_unpublished_changes, perms.
418
418
  * Get Skill Handler
419
419
  */
420
420
  getSkill(requestParameters, initOverrides) {
@@ -1,3 +1,5 @@
1
+ export * from './AdminKbApi';
2
+ export * from './AdminWorkflowsApi';
1
3
  export * from './AgentApi';
2
4
  export * from './ApiConnectionsApi';
3
5
  export * from './ApiKeysApi';
@@ -1,5 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AdminKbApi';
4
+ export * from './AdminWorkflowsApi';
3
5
  export * from './AgentApi';
4
6
  export * from './ApiConnectionsApi';
5
7
  export * from './ApiKeysApi';
@@ -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,56 @@
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 DefinitionOutputStatPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the DefinitionOutputStat interface.
17
+ */
18
+ export function instanceOfDefinitionOutputStat(value) {
19
+ if (!('definitionId' in value) || value['definitionId'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ if (!('completedRuns' in value) || value['completedRuns'] === undefined)
24
+ return false;
25
+ if (!('avgDocuments' in value) || value['avgDocuments'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function DefinitionOutputStatFromJSON(json) {
30
+ return DefinitionOutputStatFromJSONTyped(json, false);
31
+ }
32
+ export function DefinitionOutputStatFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'definitionId': json['definition_id'],
38
+ 'name': json['name'],
39
+ 'completedRuns': json['completed_runs'],
40
+ 'avgDocuments': json['avg_documents'],
41
+ };
42
+ }
43
+ export function DefinitionOutputStatToJSON(json) {
44
+ return DefinitionOutputStatToJSONTyped(json, false);
45
+ }
46
+ export function DefinitionOutputStatToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'definition_id': value['definitionId'],
52
+ 'name': value['name'],
53
+ 'completed_runs': value['completedRuns'],
54
+ 'avg_documents': value['avgDocuments'],
55
+ };
56
+ }
@@ -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,54 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export const HourHistogramResponsePropertyValidationAttributesMap = {
15
+ countsByHour: {
16
+ maxItems: 24,
17
+ minItems: 24,
18
+ uniqueItems: false,
19
+ },
20
+ };
21
+ /**
22
+ * Check if a given object implements the HourHistogramResponse interface.
23
+ */
24
+ export function instanceOfHourHistogramResponse(value) {
25
+ if (!('timezone' in value) || value['timezone'] === undefined)
26
+ return false;
27
+ if (!('countsByHour' in value) || value['countsByHour'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function HourHistogramResponseFromJSON(json) {
32
+ return HourHistogramResponseFromJSONTyped(json, false);
33
+ }
34
+ export function HourHistogramResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'timezone': json['timezone'],
40
+ 'countsByHour': json['counts_by_hour'],
41
+ };
42
+ }
43
+ export function HourHistogramResponseToJSON(json) {
44
+ return HourHistogramResponseToJSONTyped(json, false);
45
+ }
46
+ export function HourHistogramResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'timezone': value['timezone'],
52
+ 'counts_by_hour': value['countsByHour'],
53
+ };
54
+ }
@@ -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;