@knowledge-stack/ksapi 2.14.4 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,31 +12,31 @@
12
12
  import * as runtime from '../runtime';
13
13
  import type { HourHistogramResponse, RunTimeseriesResponse, TimeBucket, WorkflowLeaderboardResponse, WorkflowOutputStatsResponse, WorkflowRunSummaryResponse } from '../models/index';
14
14
  export interface GetAdminWorkflowByHourRequest {
15
- since?: Date | null;
16
- until?: Date | null;
17
15
  timezone?: string | null;
18
16
  definitionId?: string | null;
17
+ since?: Date | null;
18
+ until?: Date | null;
19
19
  }
20
20
  export interface GetAdminWorkflowLeaderboardRequest {
21
+ limit?: number;
21
22
  since?: Date | null;
22
23
  until?: Date | null;
23
- limit?: number;
24
24
  }
25
25
  export interface GetAdminWorkflowOutputStatsRequest {
26
26
  since?: Date | null;
27
27
  until?: Date | null;
28
28
  }
29
29
  export interface GetAdminWorkflowSummaryRequest {
30
+ definitionId?: string | null;
30
31
  since?: Date | null;
31
32
  until?: Date | null;
32
- definitionId?: string | null;
33
33
  }
34
34
  export interface GetAdminWorkflowTimeseriesRequest {
35
+ timezone?: string | null;
36
+ definitionId?: string | null;
35
37
  since?: Date | null;
36
38
  until?: Date | null;
37
39
  bucket?: TimeBucket;
38
- timezone?: string | null;
39
- definitionId?: string | null;
40
40
  }
41
41
  /**
42
42
  * AdminWorkflowsApi - interface
@@ -47,10 +47,10 @@ export interface GetAdminWorkflowTimeseriesRequest {
47
47
  export interface AdminWorkflowsApiInterface {
48
48
  /**
49
49
  * Creates request options for getAdminWorkflowByHour without sending the request
50
- * @param {Date} [since] Window start.
51
- * @param {Date} [until] Window end.
52
50
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
53
51
  * @param {string} [definitionId] Scope to one workflow.
52
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
53
+ * @param {Date} [until] Window end (inclusive).
54
54
  * @throws {RequiredError}
55
55
  * @memberof AdminWorkflowsApiInterface
56
56
  */
@@ -58,10 +58,10 @@ export interface AdminWorkflowsApiInterface {
58
58
  /**
59
59
  * Runs per hour-of-day (0-23) in the resolved timezone.
60
60
  * @summary Get Admin Workflow By Hour Handler
61
- * @param {Date} [since] Window start.
62
- * @param {Date} [until] Window end.
63
61
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
64
62
  * @param {string} [definitionId] Scope to one workflow.
63
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
64
+ * @param {Date} [until] Window end (inclusive).
65
65
  * @param {*} [options] Override http request option.
66
66
  * @throws {RequiredError}
67
67
  * @memberof AdminWorkflowsApiInterface
@@ -74,9 +74,9 @@ export interface AdminWorkflowsApiInterface {
74
74
  getAdminWorkflowByHour(requestParameters: GetAdminWorkflowByHourRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HourHistogramResponse>;
75
75
  /**
76
76
  * Creates request options for getAdminWorkflowLeaderboard without sending the request
77
- * @param {Date} [since] Window start.
78
- * @param {Date} [until] Window end.
79
77
  * @param {number} [limit] Top-N per leaderboard.
78
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
79
+ * @param {Date} [until] Window end (inclusive).
80
80
  * @throws {RequiredError}
81
81
  * @memberof AdminWorkflowsApiInterface
82
82
  */
@@ -84,9 +84,9 @@ export interface AdminWorkflowsApiInterface {
84
84
  /**
85
85
  * Top workflows and top run owners by run count.
86
86
  * @summary Get Admin Workflow Leaderboard Handler
87
- * @param {Date} [since] Window start.
88
- * @param {Date} [until] Window end.
89
87
  * @param {number} [limit] Top-N per leaderboard.
88
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
89
+ * @param {Date} [until] Window end (inclusive).
90
90
  * @param {*} [options] Override http request option.
91
91
  * @throws {RequiredError}
92
92
  * @memberof AdminWorkflowsApiInterface
@@ -99,8 +99,8 @@ export interface AdminWorkflowsApiInterface {
99
99
  getAdminWorkflowLeaderboard(requestParameters: GetAdminWorkflowLeaderboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowLeaderboardResponse>;
100
100
  /**
101
101
  * Creates request options for getAdminWorkflowOutputStats without sending the request
102
- * @param {Date} [since] Window start.
103
- * @param {Date} [until] Window end.
102
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
103
+ * @param {Date} [until] Window end (inclusive).
104
104
  * @throws {RequiredError}
105
105
  * @memberof AdminWorkflowsApiInterface
106
106
  */
@@ -108,8 +108,8 @@ export interface AdminWorkflowsApiInterface {
108
108
  /**
109
109
  * Average output DOCUMENTs generated per workflow definition (completed runs).
110
110
  * @summary Get Admin Workflow Output Stats Handler
111
- * @param {Date} [since] Window start.
112
- * @param {Date} [until] Window end.
111
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
112
+ * @param {Date} [until] Window end (inclusive).
113
113
  * @param {*} [options] Override http request option.
114
114
  * @throws {RequiredError}
115
115
  * @memberof AdminWorkflowsApiInterface
@@ -122,9 +122,9 @@ export interface AdminWorkflowsApiInterface {
122
122
  getAdminWorkflowOutputStats(requestParameters: GetAdminWorkflowOutputStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowOutputStatsResponse>;
123
123
  /**
124
124
  * Creates request options for getAdminWorkflowSummary without sending the request
125
+ * @param {string} [definitionId] Scope all numbers to one workflow.
125
126
  * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
126
127
  * @param {Date} [until] Window end (inclusive).
127
- * @param {string} [definitionId] Scope all numbers to one workflow.
128
128
  * @throws {RequiredError}
129
129
  * @memberof AdminWorkflowsApiInterface
130
130
  */
@@ -132,9 +132,9 @@ export interface AdminWorkflowsApiInterface {
132
132
  /**
133
133
  * Tenant-wide run health: counts, failure rate, durations, approval backlog.
134
134
  * @summary Get Admin Workflow Summary Handler
135
+ * @param {string} [definitionId] Scope all numbers to one workflow.
135
136
  * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
136
137
  * @param {Date} [until] Window end (inclusive).
137
- * @param {string} [definitionId] Scope all numbers to one workflow.
138
138
  * @param {*} [options] Override http request option.
139
139
  * @throws {RequiredError}
140
140
  * @memberof AdminWorkflowsApiInterface
@@ -147,11 +147,11 @@ export interface AdminWorkflowsApiInterface {
147
147
  getAdminWorkflowSummary(requestParameters: GetAdminWorkflowSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunSummaryResponse>;
148
148
  /**
149
149
  * Creates request options for getAdminWorkflowTimeseries without sending the request
150
- * @param {Date} [since] Window start.
151
- * @param {Date} [until] Window end.
152
- * @param {TimeBucket} [bucket] Bucket size.
153
150
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
154
151
  * @param {string} [definitionId] Scope to one workflow.
152
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
153
+ * @param {Date} [until] Window end (inclusive).
154
+ * @param {TimeBucket} [bucket] Bucket size.
155
155
  * @throws {RequiredError}
156
156
  * @memberof AdminWorkflowsApiInterface
157
157
  */
@@ -159,11 +159,11 @@ export interface AdminWorkflowsApiInterface {
159
159
  /**
160
160
  * Run counts bucketed over time, in the resolved timezone.
161
161
  * @summary Get Admin Workflow Timeseries Handler
162
- * @param {Date} [since] Window start.
163
- * @param {Date} [until] Window end.
164
- * @param {TimeBucket} [bucket] Bucket size.
165
162
  * @param {string} [timezone] IANA tz override; defaults to tenant setting.
166
163
  * @param {string} [definitionId] Scope to one workflow.
164
+ * @param {Date} [since] Window start (inclusive). Defaults to 7 days ago.
165
+ * @param {Date} [until] Window end (inclusive).
166
+ * @param {TimeBucket} [bucket] Bucket size.
167
167
  * @param {*} [options] Override http request option.
168
168
  * @throws {RequiredError}
169
169
  * @memberof AdminWorkflowsApiInterface
@@ -32,18 +32,18 @@ export class AdminWorkflowsApi extends runtime.BaseAPI {
32
32
  getAdminWorkflowByHourRequestOpts(requestParameters) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
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
35
  if (requestParameters['timezone'] != null) {
42
36
  queryParameters['timezone'] = requestParameters['timezone'];
43
37
  }
44
38
  if (requestParameters['definitionId'] != null) {
45
39
  queryParameters['definition_id'] = requestParameters['definitionId'];
46
40
  }
41
+ if (requestParameters['since'] != null) {
42
+ queryParameters['since'] = requestParameters['since'].toISOString();
43
+ }
44
+ if (requestParameters['until'] != null) {
45
+ queryParameters['until'] = requestParameters['until'].toISOString();
46
+ }
47
47
  const headerParameters = {};
48
48
  if (this.configuration && this.configuration.accessToken) {
49
49
  const token = this.configuration.accessToken;
@@ -88,15 +88,15 @@ export class AdminWorkflowsApi extends runtime.BaseAPI {
88
88
  getAdminWorkflowLeaderboardRequestOpts(requestParameters) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
90
  const queryParameters = {};
91
+ if (requestParameters['limit'] != null) {
92
+ queryParameters['limit'] = requestParameters['limit'];
93
+ }
91
94
  if (requestParameters['since'] != null) {
92
95
  queryParameters['since'] = requestParameters['since'].toISOString();
93
96
  }
94
97
  if (requestParameters['until'] != null) {
95
98
  queryParameters['until'] = requestParameters['until'].toISOString();
96
99
  }
97
- if (requestParameters['limit'] != null) {
98
- queryParameters['limit'] = requestParameters['limit'];
99
- }
100
100
  const headerParameters = {};
101
101
  if (this.configuration && this.configuration.accessToken) {
102
102
  const token = this.configuration.accessToken;
@@ -191,15 +191,15 @@ export class AdminWorkflowsApi extends runtime.BaseAPI {
191
191
  getAdminWorkflowSummaryRequestOpts(requestParameters) {
192
192
  return __awaiter(this, void 0, void 0, function* () {
193
193
  const queryParameters = {};
194
+ if (requestParameters['definitionId'] != null) {
195
+ queryParameters['definition_id'] = requestParameters['definitionId'];
196
+ }
194
197
  if (requestParameters['since'] != null) {
195
198
  queryParameters['since'] = requestParameters['since'].toISOString();
196
199
  }
197
200
  if (requestParameters['until'] != null) {
198
201
  queryParameters['until'] = requestParameters['until'].toISOString();
199
202
  }
200
- if (requestParameters['definitionId'] != null) {
201
- queryParameters['definition_id'] = requestParameters['definitionId'];
202
- }
203
203
  const headerParameters = {};
204
204
  if (this.configuration && this.configuration.accessToken) {
205
205
  const token = this.configuration.accessToken;
@@ -244,6 +244,12 @@ export class AdminWorkflowsApi extends runtime.BaseAPI {
244
244
  getAdminWorkflowTimeseriesRequestOpts(requestParameters) {
245
245
  return __awaiter(this, void 0, void 0, function* () {
246
246
  const queryParameters = {};
247
+ if (requestParameters['timezone'] != null) {
248
+ queryParameters['timezone'] = requestParameters['timezone'];
249
+ }
250
+ if (requestParameters['definitionId'] != null) {
251
+ queryParameters['definition_id'] = requestParameters['definitionId'];
252
+ }
247
253
  if (requestParameters['since'] != null) {
248
254
  queryParameters['since'] = requestParameters['since'].toISOString();
249
255
  }
@@ -253,12 +259,6 @@ export class AdminWorkflowsApi extends runtime.BaseAPI {
253
259
  if (requestParameters['bucket'] != null) {
254
260
  queryParameters['bucket'] = requestParameters['bucket'];
255
261
  }
256
- if (requestParameters['timezone'] != null) {
257
- queryParameters['timezone'] = requestParameters['timezone'];
258
- }
259
- if (requestParameters['definitionId'] != null) {
260
- queryParameters['definition_id'] = requestParameters['definitionId'];
261
- }
262
262
  const headerParameters = {};
263
263
  if (this.configuration && this.configuration.accessToken) {
264
264
  const token = this.configuration.accessToken;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ActivateSkillVersionRequest, CreateSkillRequest, PaginatedResponseSkillResponse, SearchSkillsRequest, SearchSkillsResponse, SkillOrder, SkillResponse, SkillVersionResponse, SortDirection, UpdateSkillRequest } from '../models/index';
13
+ import type { ActivateSkillVersionRequest, CreateSkillRequest, ExportSkillsRequest, PaginatedResponseSkillResponse, SearchSkillsRequest, SearchSkillsResponse, SkillOrder, SkillResponse, SkillVersionResponse, SortDirection, UpdateSkillRequest } from '../models/index';
14
14
  export interface ActivateSkillVersionOperationRequest {
15
15
  skillId: string;
16
16
  versionId: string;
@@ -34,6 +34,9 @@ export interface DiscardSkillDraftRequest {
34
34
  export interface ExportSkillRequest {
35
35
  skillId: string;
36
36
  }
37
+ export interface ExportSkillsOperationRequest {
38
+ exportSkillsRequest: ExportSkillsRequest;
39
+ }
37
40
  export interface GetSkillRequest {
38
41
  skillId: string;
39
42
  includeFileContents?: boolean;
@@ -219,6 +222,27 @@ export interface SkillsApiInterface {
219
222
  * Export Skill Handler
220
223
  */
221
224
  exportSkill(requestParameters: ExportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
225
+ /**
226
+ * Creates request options for exportSkills without sending the request
227
+ * @param {ExportSkillsRequest} exportSkillsRequest
228
+ * @throws {RequiredError}
229
+ * @memberof SkillsApiInterface
230
+ */
231
+ exportSkillsRequestOpts(requestParameters: ExportSkillsOperationRequest): Promise<runtime.RequestOpts>;
232
+ /**
233
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
234
+ * @summary Export Skills Handler
235
+ * @param {ExportSkillsRequest} exportSkillsRequest
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ * @memberof SkillsApiInterface
239
+ */
240
+ exportSkillsRaw(requestParameters: ExportSkillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
241
+ /**
242
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
243
+ * Export Skills Handler
244
+ */
245
+ exportSkills(requestParameters: ExportSkillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
222
246
  /**
223
247
  * Creates request options for getSkill without sending the request
224
248
  * @param {string} skillId
@@ -481,6 +505,20 @@ export declare class SkillsApi extends runtime.BaseAPI implements SkillsApiInter
481
505
  * Export Skill Handler
482
506
  */
483
507
  exportSkill(requestParameters: ExportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
508
+ /**
509
+ * Creates request options for exportSkills without sending the request
510
+ */
511
+ exportSkillsRequestOpts(requestParameters: ExportSkillsOperationRequest): Promise<runtime.RequestOpts>;
512
+ /**
513
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
514
+ * Export Skills Handler
515
+ */
516
+ exportSkillsRaw(requestParameters: ExportSkillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
517
+ /**
518
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
519
+ * Export Skills Handler
520
+ */
521
+ exportSkills(requestParameters: ExportSkillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
484
522
  /**
485
523
  * Creates request options for getSkill without sending the request
486
524
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { ActivateSkillVersionRequestToJSON, CreateSkillRequestToJSON, PaginatedResponseSkillResponseFromJSON, SearchSkillsRequestToJSON, SearchSkillsResponseFromJSON, SkillResponseFromJSON, SkillVersionResponseFromJSON, UpdateSkillRequestToJSON, } from '../models/index';
24
+ import { ActivateSkillVersionRequestToJSON, CreateSkillRequestToJSON, ExportSkillsRequestToJSON, PaginatedResponseSkillResponseFromJSON, SearchSkillsRequestToJSON, SearchSkillsResponseFromJSON, SkillResponseFromJSON, SkillVersionResponseFromJSON, UpdateSkillRequestToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -375,6 +375,55 @@ export class SkillsApi extends runtime.BaseAPI {
375
375
  return yield response.value();
376
376
  });
377
377
  }
378
+ /**
379
+ * Creates request options for exportSkills without sending the request
380
+ */
381
+ exportSkillsRequestOpts(requestParameters) {
382
+ return __awaiter(this, void 0, void 0, function* () {
383
+ if (requestParameters['exportSkillsRequest'] == null) {
384
+ throw new runtime.RequiredError('exportSkillsRequest', 'Required parameter "exportSkillsRequest" was null or undefined when calling exportSkills().');
385
+ }
386
+ const queryParameters = {};
387
+ const headerParameters = {};
388
+ headerParameters['Content-Type'] = 'application/json';
389
+ if (this.configuration && this.configuration.accessToken) {
390
+ const token = this.configuration.accessToken;
391
+ const tokenString = yield token("bearerAuth", []);
392
+ if (tokenString) {
393
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
394
+ }
395
+ }
396
+ let urlPath = `/v1/skills/export`;
397
+ return {
398
+ path: urlPath,
399
+ method: 'POST',
400
+ headers: headerParameters,
401
+ query: queryParameters,
402
+ body: ExportSkillsRequestToJSON(requestParameters['exportSkillsRequest']),
403
+ };
404
+ });
405
+ }
406
+ /**
407
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
408
+ * Export Skills Handler
409
+ */
410
+ exportSkillsRaw(requestParameters, initOverrides) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ const requestOptions = yield this.exportSkillsRequestOpts(requestParameters);
413
+ const response = yield this.request(requestOptions, initOverrides);
414
+ return new runtime.BlobApiResponse(response);
415
+ });
416
+ }
417
+ /**
418
+ * Download several skills\' active versions as one ZIP; needs can_read on each.
419
+ * Export Skills Handler
420
+ */
421
+ exportSkills(requestParameters, initOverrides) {
422
+ return __awaiter(this, void 0, void 0, function* () {
423
+ const response = yield this.exportSkillsRaw(requestParameters, initOverrides);
424
+ return yield response.value();
425
+ });
426
+ }
378
427
  /**
379
428
  * Creates request options for getSkill without sending the request
380
429
  */
@@ -0,0 +1,47 @@
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
+ * Skills to pack into one ZIP, each under a top-level folder named after it.
14
+ * @export
15
+ * @interface ExportSkillsRequest
16
+ */
17
+ export interface ExportSkillsRequest {
18
+ /**
19
+ * Skills whose frozen active versions are packed together; duplicates are ignored. Every skill must exist and be readable.
20
+ * @type {Array<string>}
21
+ * @memberof ExportSkillsRequest
22
+ */
23
+ skillIds: Array<string>;
24
+ }
25
+ export declare const ExportSkillsRequestPropertyValidationAttributesMap: {
26
+ [property: string]: {
27
+ maxLength?: number;
28
+ minLength?: number;
29
+ pattern?: string;
30
+ maximum?: number;
31
+ exclusiveMaximum?: boolean;
32
+ minimum?: number;
33
+ exclusiveMinimum?: boolean;
34
+ multipleOf?: number;
35
+ maxItems?: number;
36
+ minItems?: number;
37
+ uniqueItems?: boolean;
38
+ };
39
+ };
40
+ /**
41
+ * Check if a given object implements the ExportSkillsRequest interface.
42
+ */
43
+ export declare function instanceOfExportSkillsRequest(value: object): value is ExportSkillsRequest;
44
+ export declare function ExportSkillsRequestFromJSON(json: any): ExportSkillsRequest;
45
+ export declare function ExportSkillsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportSkillsRequest;
46
+ export declare function ExportSkillsRequestToJSON(json: any): ExportSkillsRequest;
47
+ export declare function ExportSkillsRequestToJSONTyped(value?: ExportSkillsRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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 ExportSkillsRequestPropertyValidationAttributesMap = {
15
+ skillIds: {
16
+ maxItems: 50,
17
+ minItems: 1,
18
+ uniqueItems: false,
19
+ },
20
+ };
21
+ /**
22
+ * Check if a given object implements the ExportSkillsRequest interface.
23
+ */
24
+ export function instanceOfExportSkillsRequest(value) {
25
+ if (!('skillIds' in value) || value['skillIds'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function ExportSkillsRequestFromJSON(json) {
30
+ return ExportSkillsRequestFromJSONTyped(json, false);
31
+ }
32
+ export function ExportSkillsRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'skillIds': json['skill_ids'],
38
+ };
39
+ }
40
+ export function ExportSkillsRequestToJSON(json) {
41
+ return ExportSkillsRequestToJSONTyped(json, false);
42
+ }
43
+ export function ExportSkillsRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'skill_ids': value['skillIds'],
49
+ };
50
+ }
@@ -136,6 +136,7 @@ export * from './EnrichedThreadMessageContent';
136
136
  export * from './ErrorResponse';
137
137
  export * from './EventResponse';
138
138
  export * from './ExcludedCommonFile';
139
+ export * from './ExportSkillsRequest';
139
140
  export * from './ExtractRequest';
140
141
  export * from './ExtractResponse';
141
142
  export * from './FeaturesResponse';
@@ -138,6 +138,7 @@ export * from './EnrichedThreadMessageContent';
138
138
  export * from './ErrorResponse';
139
139
  export * from './EventResponse';
140
140
  export * from './ExcludedCommonFile';
141
+ export * from './ExportSkillsRequest';
141
142
  export * from './ExtractRequest';
142
143
  export * from './ExtractResponse';
143
144
  export * from './FeaturesResponse';
@@ -0,0 +1,47 @@
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
+ * Skills to pack into one ZIP, each under a top-level folder named after it.
14
+ * @export
15
+ * @interface ExportSkillsRequest
16
+ */
17
+ export interface ExportSkillsRequest {
18
+ /**
19
+ * Skills whose frozen active versions are packed together; duplicates are ignored. Every skill must exist and be readable.
20
+ * @type {Array<string>}
21
+ * @memberof ExportSkillsRequest
22
+ */
23
+ skillIds: Array<string>;
24
+ }
25
+ export declare const ExportSkillsRequestPropertyValidationAttributesMap: {
26
+ [property: string]: {
27
+ maxLength?: number;
28
+ minLength?: number;
29
+ pattern?: string;
30
+ maximum?: number;
31
+ exclusiveMaximum?: boolean;
32
+ minimum?: number;
33
+ exclusiveMinimum?: boolean;
34
+ multipleOf?: number;
35
+ maxItems?: number;
36
+ minItems?: number;
37
+ uniqueItems?: boolean;
38
+ };
39
+ };
40
+ /**
41
+ * Check if a given object implements the ExportSkillsRequest interface.
42
+ */
43
+ export declare function instanceOfExportSkillsRequest(value: object): value is ExportSkillsRequest;
44
+ export declare function ExportSkillsRequestFromJSON(json: any): ExportSkillsRequest;
45
+ export declare function ExportSkillsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportSkillsRequest;
46
+ export declare function ExportSkillsRequestToJSON(json: any): ExportSkillsRequest;
47
+ export declare function ExportSkillsRequestToJSONTyped(value?: ExportSkillsRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ExportSkillsRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfExportSkillsRequest = instanceOfExportSkillsRequest;
18
+ exports.ExportSkillsRequestFromJSON = ExportSkillsRequestFromJSON;
19
+ exports.ExportSkillsRequestFromJSONTyped = ExportSkillsRequestFromJSONTyped;
20
+ exports.ExportSkillsRequestToJSON = ExportSkillsRequestToJSON;
21
+ exports.ExportSkillsRequestToJSONTyped = ExportSkillsRequestToJSONTyped;
22
+ exports.ExportSkillsRequestPropertyValidationAttributesMap = {
23
+ skillIds: {
24
+ maxItems: 50,
25
+ minItems: 1,
26
+ uniqueItems: false,
27
+ },
28
+ };
29
+ /**
30
+ * Check if a given object implements the ExportSkillsRequest interface.
31
+ */
32
+ function instanceOfExportSkillsRequest(value) {
33
+ if (!('skillIds' in value) || value['skillIds'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function ExportSkillsRequestFromJSON(json) {
38
+ return ExportSkillsRequestFromJSONTyped(json, false);
39
+ }
40
+ function ExportSkillsRequestFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'skillIds': json['skill_ids'],
46
+ };
47
+ }
48
+ function ExportSkillsRequestToJSON(json) {
49
+ return ExportSkillsRequestToJSONTyped(json, false);
50
+ }
51
+ function ExportSkillsRequestToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'skill_ids': value['skillIds'],
57
+ };
58
+ }
@@ -136,6 +136,7 @@ export * from './EnrichedThreadMessageContent';
136
136
  export * from './ErrorResponse';
137
137
  export * from './EventResponse';
138
138
  export * from './ExcludedCommonFile';
139
+ export * from './ExportSkillsRequest';
139
140
  export * from './ExtractRequest';
140
141
  export * from './ExtractResponse';
141
142
  export * from './FeaturesResponse';
@@ -154,6 +154,7 @@ __exportStar(require("./EnrichedThreadMessageContent"), exports);
154
154
  __exportStar(require("./ErrorResponse"), exports);
155
155
  __exportStar(require("./EventResponse"), exports);
156
156
  __exportStar(require("./ExcludedCommonFile"), exports);
157
+ __exportStar(require("./ExportSkillsRequest"), exports);
157
158
  __exportStar(require("./ExtractRequest"), exports);
158
159
  __exportStar(require("./ExtractResponse"), exports);
159
160
  __exportStar(require("./FeaturesResponse"), exports);