@knowledge-stack/ksapi 1.147.2 → 1.149.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 (39) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +4 -2
  3. package/dist/esm/models/FeaturesResponse.d.ts +7 -0
  4. package/dist/esm/models/FeaturesResponse.js +5 -0
  5. package/dist/esm/models/KbMetric.d.ts +2 -0
  6. package/dist/esm/models/KbMetric.js +3 -1
  7. package/dist/esm/models/KbTimeseriesResponse.d.ts +1 -1
  8. package/dist/esm/models/UpdateWorkflowRunRequest.js +1 -1
  9. package/dist/esm/models/UploadConstraints.d.ts +60 -0
  10. package/dist/esm/models/UploadConstraints.js +53 -0
  11. package/dist/esm/models/UploadFormat.d.ts +53 -0
  12. package/dist/esm/models/UploadFormat.js +48 -0
  13. package/dist/esm/models/index.d.ts +2 -0
  14. package/dist/esm/models/index.js +2 -0
  15. package/dist/models/FeaturesResponse.d.ts +7 -0
  16. package/dist/models/FeaturesResponse.js +5 -0
  17. package/dist/models/KbMetric.d.ts +2 -0
  18. package/dist/models/KbMetric.js +3 -1
  19. package/dist/models/KbTimeseriesResponse.d.ts +1 -1
  20. package/dist/models/UpdateWorkflowRunRequest.js +1 -1
  21. package/dist/models/UploadConstraints.d.ts +60 -0
  22. package/dist/models/UploadConstraints.js +61 -0
  23. package/dist/models/UploadFormat.d.ts +53 -0
  24. package/dist/models/UploadFormat.js +56 -0
  25. package/dist/models/index.d.ts +2 -0
  26. package/dist/models/index.js +2 -0
  27. package/docs/AdminKbApi.md +1 -1
  28. package/docs/FeaturesResponse.md +2 -0
  29. package/docs/KbTimeseriesResponse.md +1 -1
  30. package/docs/UploadConstraints.md +38 -0
  31. package/docs/UploadFormat.md +36 -0
  32. package/package.json +1 -1
  33. package/src/models/FeaturesResponse.ts +16 -0
  34. package/src/models/KbMetric.ts +3 -1
  35. package/src/models/KbTimeseriesResponse.ts +1 -1
  36. package/src/models/UpdateWorkflowRunRequest.ts +1 -1
  37. package/src/models/UploadConstraints.ts +109 -0
  38. package/src/models/UploadFormat.ts +92 -0
  39. package/src/models/index.ts +2 -0
@@ -364,6 +364,8 @@ docs/UpdateThreadRequest.md
364
364
  docs/UpdateUserRequest.md
365
365
  docs/UpdateWorkflowDefinitionRequest.md
366
366
  docs/UpdateWorkflowRunRequest.md
367
+ docs/UploadConstraints.md
368
+ docs/UploadFormat.md
367
369
  docs/UsageMetric.md
368
370
  docs/UserInfo.md
369
371
  docs/UserMessageRequest.md
@@ -771,6 +773,8 @@ src/models/UpdateThreadRequest.ts
771
773
  src/models/UpdateUserRequest.ts
772
774
  src/models/UpdateWorkflowDefinitionRequest.ts
773
775
  src/models/UpdateWorkflowRunRequest.ts
776
+ src/models/UploadConstraints.ts
777
+ src/models/UploadFormat.ts
774
778
  src/models/UsageMetric.ts
775
779
  src/models/UserInfo.ts
776
780
  src/models/UserMessageRequest.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.147.2
1
+ # @knowledge-stack/ksapi@1.149.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -619,6 +619,8 @@ All URIs are relative to *http://localhost:8000*
619
619
  - [UpdateUserRequest](docs/UpdateUserRequest.md)
620
620
  - [UpdateWorkflowDefinitionRequest](docs/UpdateWorkflowDefinitionRequest.md)
621
621
  - [UpdateWorkflowRunRequest](docs/UpdateWorkflowRunRequest.md)
622
+ - [UploadConstraints](docs/UploadConstraints.md)
623
+ - [UploadFormat](docs/UploadFormat.md)
622
624
  - [UsageMetric](docs/UsageMetric.md)
623
625
  - [UserInfo](docs/UserInfo.md)
624
626
  - [UserMessageRequest](docs/UserMessageRequest.md)
@@ -676,7 +678,7 @@ and is automatically generated by the
676
678
  [OpenAPI Generator](https://openapi-generator.tech) project:
677
679
 
678
680
  - API version: `0.1.0`
679
- - Package version: `1.147.2`
681
+ - Package version: `1.149.0`
680
682
  - Generator version: `7.21.0`
681
683
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
682
684
 
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SupportedLanguage } from './SupportedLanguage';
13
+ import type { UploadConstraints } from './UploadConstraints';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -46,6 +47,12 @@ export interface FeaturesResponse {
46
47
  * @memberof FeaturesResponse
47
48
  */
48
49
  defaultFrontendLanguage: SupportedLanguage;
50
+ /**
51
+ *
52
+ * @type {UploadConstraints}
53
+ * @memberof FeaturesResponse
54
+ */
55
+ upload: UploadConstraints;
49
56
  }
50
57
  export declare const FeaturesResponsePropertyValidationAttributesMap: {
51
58
  [property: string]: {
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { SupportedLanguageFromJSON, SupportedLanguageToJSON, } from './SupportedLanguage';
15
+ import { UploadConstraintsFromJSON, UploadConstraintsToJSON, } from './UploadConstraints';
15
16
  export const FeaturesResponsePropertyValidationAttributesMap = {};
16
17
  /**
17
18
  * Check if a given object implements the FeaturesResponse interface.
@@ -27,6 +28,8 @@ export function instanceOfFeaturesResponse(value) {
27
28
  return false;
28
29
  if (!('defaultFrontendLanguage' in value) || value['defaultFrontendLanguage'] === undefined)
29
30
  return false;
31
+ if (!('upload' in value) || value['upload'] === undefined)
32
+ return false;
30
33
  return true;
31
34
  }
32
35
  export function FeaturesResponseFromJSON(json) {
@@ -42,6 +45,7 @@ export function FeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
42
45
  'githubLoginEnabled': json['github_login_enabled'],
43
46
  'smsLoginEnabled': json['sms_login_enabled'],
44
47
  'defaultFrontendLanguage': SupportedLanguageFromJSON(json['default_frontend_language']),
48
+ 'upload': UploadConstraintsFromJSON(json['upload']),
45
49
  };
46
50
  }
47
51
  export function FeaturesResponseToJSON(json) {
@@ -57,5 +61,6 @@ export function FeaturesResponseToJSONTyped(value, ignoreDiscriminator = false)
57
61
  'github_login_enabled': value['githubLoginEnabled'],
58
62
  'sms_login_enabled': value['smsLoginEnabled'],
59
63
  'default_frontend_language': SupportedLanguageToJSON(value['defaultFrontendLanguage']),
64
+ 'upload': UploadConstraintsToJSON(value['upload']),
60
65
  };
61
66
  }
@@ -17,6 +17,8 @@ export declare const KbMetric: {
17
17
  readonly DocumentUploads: 'document_uploads';
18
18
  readonly IngestionCompleted: 'ingestion_completed';
19
19
  readonly IngestionFailed: 'ingestion_failed';
20
+ readonly Message: 'message';
21
+ readonly Search: 'search';
20
22
  };
21
23
  export type KbMetric = typeof KbMetric[keyof typeof KbMetric];
22
24
  export declare function instanceOfKbMetric(value: any): boolean;
@@ -18,7 +18,9 @@
18
18
  export const KbMetric = {
19
19
  DocumentUploads: 'document_uploads',
20
20
  IngestionCompleted: 'ingestion_completed',
21
- IngestionFailed: 'ingestion_failed'
21
+ IngestionFailed: 'ingestion_failed',
22
+ Message: 'message',
23
+ Search: 'search'
22
24
  };
23
25
  export function instanceOfKbMetric(value) {
24
26
  for (const key in KbMetric) {
@@ -16,7 +16,7 @@ import type { LabeledSeries } from './LabeledSeries';
16
16
  * A knowledge-base metric bucketed over time.
17
17
  *
18
18
  * ``series`` carries one entry per split — two (SOURCE / GENERATED) for
19
- * ``document_uploads``, one for the ingestion metrics.
19
+ * ``document_uploads``, one for the ingestion, message, and search metrics.
20
20
  * @export
21
21
  * @interface KbTimeseriesResponse
22
22
  */
@@ -13,7 +13,7 @@
13
13
  */
14
14
  export const UpdateWorkflowRunRequestPropertyValidationAttributesMap = {
15
15
  inputScope: {
16
- maxItems: 50,
16
+ maxItems: 200,
17
17
  uniqueItems: false,
18
18
  },
19
19
  name: {
@@ -0,0 +1,60 @@
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 { UploadFormat } from './UploadFormat';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UploadConstraints
17
+ */
18
+ export interface UploadConstraints {
19
+ /**
20
+ *
21
+ * @type {Array<UploadFormat>}
22
+ * @memberof UploadConstraints
23
+ */
24
+ formats: Array<UploadFormat>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof UploadConstraints
29
+ */
30
+ maxBytes: number;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof UploadConstraints
35
+ */
36
+ maxImageBytes: number;
37
+ }
38
+ export declare const UploadConstraintsPropertyValidationAttributesMap: {
39
+ [property: string]: {
40
+ maxLength?: number;
41
+ minLength?: number;
42
+ pattern?: string;
43
+ maximum?: number;
44
+ exclusiveMaximum?: boolean;
45
+ minimum?: number;
46
+ exclusiveMinimum?: boolean;
47
+ multipleOf?: number;
48
+ maxItems?: number;
49
+ minItems?: number;
50
+ uniqueItems?: boolean;
51
+ };
52
+ };
53
+ /**
54
+ * Check if a given object implements the UploadConstraints interface.
55
+ */
56
+ export declare function instanceOfUploadConstraints(value: object): value is UploadConstraints;
57
+ export declare function UploadConstraintsFromJSON(json: any): UploadConstraints;
58
+ export declare function UploadConstraintsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadConstraints;
59
+ export declare function UploadConstraintsToJSON(json: any): UploadConstraints;
60
+ export declare function UploadConstraintsToJSONTyped(value?: UploadConstraints | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
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 { UploadFormatFromJSON, UploadFormatToJSON, } from './UploadFormat';
15
+ export const UploadConstraintsPropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the UploadConstraints interface.
18
+ */
19
+ export function instanceOfUploadConstraints(value) {
20
+ if (!('formats' in value) || value['formats'] === undefined)
21
+ return false;
22
+ if (!('maxBytes' in value) || value['maxBytes'] === undefined)
23
+ return false;
24
+ if (!('maxImageBytes' in value) || value['maxImageBytes'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function UploadConstraintsFromJSON(json) {
29
+ return UploadConstraintsFromJSONTyped(json, false);
30
+ }
31
+ export function UploadConstraintsFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'formats': (json['formats'].map(UploadFormatFromJSON)),
37
+ 'maxBytes': json['max_bytes'],
38
+ 'maxImageBytes': json['max_image_bytes'],
39
+ };
40
+ }
41
+ export function UploadConstraintsToJSON(json) {
42
+ return UploadConstraintsToJSONTyped(json, false);
43
+ }
44
+ export function UploadConstraintsToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'formats': (value['formats'].map(UploadFormatToJSON)),
50
+ 'max_bytes': value['maxBytes'],
51
+ 'max_image_bytes': value['maxImageBytes'],
52
+ };
53
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface UploadFormat
16
+ */
17
+ export interface UploadFormat {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UploadFormat
22
+ */
23
+ extension: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UploadFormat
28
+ */
29
+ contentType: string;
30
+ }
31
+ export declare const UploadFormatPropertyValidationAttributesMap: {
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 UploadFormat interface.
48
+ */
49
+ export declare function instanceOfUploadFormat(value: object): value is UploadFormat;
50
+ export declare function UploadFormatFromJSON(json: any): UploadFormat;
51
+ export declare function UploadFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadFormat;
52
+ export declare function UploadFormatToJSON(json: any): UploadFormat;
53
+ export declare function UploadFormatToJSONTyped(value?: UploadFormat | 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 UploadFormatPropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the UploadFormat interface.
17
+ */
18
+ export function instanceOfUploadFormat(value) {
19
+ if (!('extension' in value) || value['extension'] === undefined)
20
+ return false;
21
+ if (!('contentType' in value) || value['contentType'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function UploadFormatFromJSON(json) {
26
+ return UploadFormatFromJSONTyped(json, false);
27
+ }
28
+ export function UploadFormatFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'extension': json['extension'],
34
+ 'contentType': json['content_type'],
35
+ };
36
+ }
37
+ export function UploadFormatToJSON(json) {
38
+ return UploadFormatToJSONTyped(json, false);
39
+ }
40
+ export function UploadFormatToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'extension': value['extension'],
46
+ 'content_type': value['contentType'],
47
+ };
48
+ }
@@ -327,6 +327,8 @@ export * from './UpdateThreadRequest';
327
327
  export * from './UpdateUserRequest';
328
328
  export * from './UpdateWorkflowDefinitionRequest';
329
329
  export * from './UpdateWorkflowRunRequest';
330
+ export * from './UploadConstraints';
331
+ export * from './UploadFormat';
330
332
  export * from './UsageMetric';
331
333
  export * from './UserInfo';
332
334
  export * from './UserMessageRequest';
@@ -329,6 +329,8 @@ export * from './UpdateThreadRequest';
329
329
  export * from './UpdateUserRequest';
330
330
  export * from './UpdateWorkflowDefinitionRequest';
331
331
  export * from './UpdateWorkflowRunRequest';
332
+ export * from './UploadConstraints';
333
+ export * from './UploadFormat';
332
334
  export * from './UsageMetric';
333
335
  export * from './UserInfo';
334
336
  export * from './UserMessageRequest';
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SupportedLanguage } from './SupportedLanguage';
13
+ import type { UploadConstraints } from './UploadConstraints';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -46,6 +47,12 @@ export interface FeaturesResponse {
46
47
  * @memberof FeaturesResponse
47
48
  */
48
49
  defaultFrontendLanguage: SupportedLanguage;
50
+ /**
51
+ *
52
+ * @type {UploadConstraints}
53
+ * @memberof FeaturesResponse
54
+ */
55
+ upload: UploadConstraints;
49
56
  }
50
57
  export declare const FeaturesResponsePropertyValidationAttributesMap: {
51
58
  [property: string]: {
@@ -20,6 +20,7 @@ exports.FeaturesResponseFromJSONTyped = FeaturesResponseFromJSONTyped;
20
20
  exports.FeaturesResponseToJSON = FeaturesResponseToJSON;
21
21
  exports.FeaturesResponseToJSONTyped = FeaturesResponseToJSONTyped;
22
22
  const SupportedLanguage_1 = require("./SupportedLanguage");
23
+ const UploadConstraints_1 = require("./UploadConstraints");
23
24
  exports.FeaturesResponsePropertyValidationAttributesMap = {};
24
25
  /**
25
26
  * Check if a given object implements the FeaturesResponse interface.
@@ -35,6 +36,8 @@ function instanceOfFeaturesResponse(value) {
35
36
  return false;
36
37
  if (!('defaultFrontendLanguage' in value) || value['defaultFrontendLanguage'] === undefined)
37
38
  return false;
39
+ if (!('upload' in value) || value['upload'] === undefined)
40
+ return false;
38
41
  return true;
39
42
  }
40
43
  function FeaturesResponseFromJSON(json) {
@@ -50,6 +53,7 @@ function FeaturesResponseFromJSONTyped(json, ignoreDiscriminator) {
50
53
  'githubLoginEnabled': json['github_login_enabled'],
51
54
  'smsLoginEnabled': json['sms_login_enabled'],
52
55
  'defaultFrontendLanguage': (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['default_frontend_language']),
56
+ 'upload': (0, UploadConstraints_1.UploadConstraintsFromJSON)(json['upload']),
53
57
  };
54
58
  }
55
59
  function FeaturesResponseToJSON(json) {
@@ -65,5 +69,6 @@ function FeaturesResponseToJSONTyped(value, ignoreDiscriminator = false) {
65
69
  'github_login_enabled': value['githubLoginEnabled'],
66
70
  'sms_login_enabled': value['smsLoginEnabled'],
67
71
  'default_frontend_language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['defaultFrontendLanguage']),
72
+ 'upload': (0, UploadConstraints_1.UploadConstraintsToJSON)(value['upload']),
68
73
  };
69
74
  }
@@ -17,6 +17,8 @@ export declare const KbMetric: {
17
17
  readonly DocumentUploads: 'document_uploads';
18
18
  readonly IngestionCompleted: 'ingestion_completed';
19
19
  readonly IngestionFailed: 'ingestion_failed';
20
+ readonly Message: 'message';
21
+ readonly Search: 'search';
20
22
  };
21
23
  export type KbMetric = typeof KbMetric[keyof typeof KbMetric];
22
24
  export declare function instanceOfKbMetric(value: any): boolean;
@@ -26,7 +26,9 @@ exports.KbMetricToJSONTyped = KbMetricToJSONTyped;
26
26
  exports.KbMetric = {
27
27
  DocumentUploads: 'document_uploads',
28
28
  IngestionCompleted: 'ingestion_completed',
29
- IngestionFailed: 'ingestion_failed'
29
+ IngestionFailed: 'ingestion_failed',
30
+ Message: 'message',
31
+ Search: 'search'
30
32
  };
31
33
  function instanceOfKbMetric(value) {
32
34
  for (const key in exports.KbMetric) {
@@ -16,7 +16,7 @@ import type { LabeledSeries } from './LabeledSeries';
16
16
  * A knowledge-base metric bucketed over time.
17
17
  *
18
18
  * ``series`` carries one entry per split — two (SOURCE / GENERATED) for
19
- * ``document_uploads``, one for the ingestion metrics.
19
+ * ``document_uploads``, one for the ingestion, message, and search metrics.
20
20
  * @export
21
21
  * @interface KbTimeseriesResponse
22
22
  */
@@ -21,7 +21,7 @@ exports.UpdateWorkflowRunRequestToJSON = UpdateWorkflowRunRequestToJSON;
21
21
  exports.UpdateWorkflowRunRequestToJSONTyped = UpdateWorkflowRunRequestToJSONTyped;
22
22
  exports.UpdateWorkflowRunRequestPropertyValidationAttributesMap = {
23
23
  inputScope: {
24
- maxItems: 50,
24
+ maxItems: 200,
25
25
  uniqueItems: false,
26
26
  },
27
27
  name: {
@@ -0,0 +1,60 @@
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 { UploadFormat } from './UploadFormat';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UploadConstraints
17
+ */
18
+ export interface UploadConstraints {
19
+ /**
20
+ *
21
+ * @type {Array<UploadFormat>}
22
+ * @memberof UploadConstraints
23
+ */
24
+ formats: Array<UploadFormat>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof UploadConstraints
29
+ */
30
+ maxBytes: number;
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof UploadConstraints
35
+ */
36
+ maxImageBytes: number;
37
+ }
38
+ export declare const UploadConstraintsPropertyValidationAttributesMap: {
39
+ [property: string]: {
40
+ maxLength?: number;
41
+ minLength?: number;
42
+ pattern?: string;
43
+ maximum?: number;
44
+ exclusiveMaximum?: boolean;
45
+ minimum?: number;
46
+ exclusiveMinimum?: boolean;
47
+ multipleOf?: number;
48
+ maxItems?: number;
49
+ minItems?: number;
50
+ uniqueItems?: boolean;
51
+ };
52
+ };
53
+ /**
54
+ * Check if a given object implements the UploadConstraints interface.
55
+ */
56
+ export declare function instanceOfUploadConstraints(value: object): value is UploadConstraints;
57
+ export declare function UploadConstraintsFromJSON(json: any): UploadConstraints;
58
+ export declare function UploadConstraintsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadConstraints;
59
+ export declare function UploadConstraintsToJSON(json: any): UploadConstraints;
60
+ export declare function UploadConstraintsToJSONTyped(value?: UploadConstraints | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
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.UploadConstraintsPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfUploadConstraints = instanceOfUploadConstraints;
18
+ exports.UploadConstraintsFromJSON = UploadConstraintsFromJSON;
19
+ exports.UploadConstraintsFromJSONTyped = UploadConstraintsFromJSONTyped;
20
+ exports.UploadConstraintsToJSON = UploadConstraintsToJSON;
21
+ exports.UploadConstraintsToJSONTyped = UploadConstraintsToJSONTyped;
22
+ const UploadFormat_1 = require("./UploadFormat");
23
+ exports.UploadConstraintsPropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the UploadConstraints interface.
26
+ */
27
+ function instanceOfUploadConstraints(value) {
28
+ if (!('formats' in value) || value['formats'] === undefined)
29
+ return false;
30
+ if (!('maxBytes' in value) || value['maxBytes'] === undefined)
31
+ return false;
32
+ if (!('maxImageBytes' in value) || value['maxImageBytes'] === undefined)
33
+ return false;
34
+ return true;
35
+ }
36
+ function UploadConstraintsFromJSON(json) {
37
+ return UploadConstraintsFromJSONTyped(json, false);
38
+ }
39
+ function UploadConstraintsFromJSONTyped(json, ignoreDiscriminator) {
40
+ if (json == null) {
41
+ return json;
42
+ }
43
+ return {
44
+ 'formats': (json['formats'].map(UploadFormat_1.UploadFormatFromJSON)),
45
+ 'maxBytes': json['max_bytes'],
46
+ 'maxImageBytes': json['max_image_bytes'],
47
+ };
48
+ }
49
+ function UploadConstraintsToJSON(json) {
50
+ return UploadConstraintsToJSONTyped(json, false);
51
+ }
52
+ function UploadConstraintsToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'formats': (value['formats'].map(UploadFormat_1.UploadFormatToJSON)),
58
+ 'max_bytes': value['maxBytes'],
59
+ 'max_image_bytes': value['maxImageBytes'],
60
+ };
61
+ }
@@ -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
+ *
14
+ * @export
15
+ * @interface UploadFormat
16
+ */
17
+ export interface UploadFormat {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UploadFormat
22
+ */
23
+ extension: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UploadFormat
28
+ */
29
+ contentType: string;
30
+ }
31
+ export declare const UploadFormatPropertyValidationAttributesMap: {
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 UploadFormat interface.
48
+ */
49
+ export declare function instanceOfUploadFormat(value: object): value is UploadFormat;
50
+ export declare function UploadFormatFromJSON(json: any): UploadFormat;
51
+ export declare function UploadFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadFormat;
52
+ export declare function UploadFormatToJSON(json: any): UploadFormat;
53
+ export declare function UploadFormatToJSONTyped(value?: UploadFormat | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
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.UploadFormatPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfUploadFormat = instanceOfUploadFormat;
18
+ exports.UploadFormatFromJSON = UploadFormatFromJSON;
19
+ exports.UploadFormatFromJSONTyped = UploadFormatFromJSONTyped;
20
+ exports.UploadFormatToJSON = UploadFormatToJSON;
21
+ exports.UploadFormatToJSONTyped = UploadFormatToJSONTyped;
22
+ exports.UploadFormatPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the UploadFormat interface.
25
+ */
26
+ function instanceOfUploadFormat(value) {
27
+ if (!('extension' in value) || value['extension'] === undefined)
28
+ return false;
29
+ if (!('contentType' in value) || value['contentType'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function UploadFormatFromJSON(json) {
34
+ return UploadFormatFromJSONTyped(json, false);
35
+ }
36
+ function UploadFormatFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'extension': json['extension'],
42
+ 'contentType': json['content_type'],
43
+ };
44
+ }
45
+ function UploadFormatToJSON(json) {
46
+ return UploadFormatToJSONTyped(json, false);
47
+ }
48
+ function UploadFormatToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'extension': value['extension'],
54
+ 'content_type': value['contentType'],
55
+ };
56
+ }
@@ -327,6 +327,8 @@ export * from './UpdateThreadRequest';
327
327
  export * from './UpdateUserRequest';
328
328
  export * from './UpdateWorkflowDefinitionRequest';
329
329
  export * from './UpdateWorkflowRunRequest';
330
+ export * from './UploadConstraints';
331
+ export * from './UploadFormat';
330
332
  export * from './UsageMetric';
331
333
  export * from './UserInfo';
332
334
  export * from './UserMessageRequest';
@@ -345,6 +345,8 @@ __exportStar(require("./UpdateThreadRequest"), exports);
345
345
  __exportStar(require("./UpdateUserRequest"), exports);
346
346
  __exportStar(require("./UpdateWorkflowDefinitionRequest"), exports);
347
347
  __exportStar(require("./UpdateWorkflowRunRequest"), exports);
348
+ __exportStar(require("./UploadConstraints"), exports);
349
+ __exportStar(require("./UploadFormat"), exports);
348
350
  __exportStar(require("./UsageMetric"), exports);
349
351
  __exportStar(require("./UserInfo"), exports);
350
352
  __exportStar(require("./UserMessageRequest"), exports);
@@ -132,7 +132,7 @@ example().catch(console.error);
132
132
 
133
133
  | Name | Type | Description | Notes |
134
134
  |------------- | ------------- | ------------- | -------------|
135
- | **metric** | `KbMetric` | Which KB metric to bucket. | [Defaults to `undefined`] [Enum: document_uploads, ingestion_completed, ingestion_failed] |
135
+ | **metric** | `KbMetric` | Which KB metric to bucket. | [Defaults to `undefined`] [Enum: document_uploads, ingestion_completed, ingestion_failed, message, search] |
136
136
  | **since** | `Date` | Window start. | [Optional] [Defaults to `undefined`] |
137
137
  | **until** | `Date` | Window end. | [Optional] [Defaults to `undefined`] |
138
138
  | **bucket** | `TimeBucket` | Bucket size. | [Optional] [Defaults to `undefined`] [Enum: hour, day, week, month] |
@@ -11,6 +11,7 @@ Name | Type
11
11
  `githubLoginEnabled` | boolean
12
12
  `smsLoginEnabled` | boolean
13
13
  `defaultFrontendLanguage` | [SupportedLanguage](SupportedLanguage.md)
14
+ `upload` | [UploadConstraints](UploadConstraints.md)
14
15
 
15
16
  ## Example
16
17
 
@@ -24,6 +25,7 @@ const example = {
24
25
  "githubLoginEnabled": null,
25
26
  "smsLoginEnabled": null,
26
27
  "defaultFrontendLanguage": null,
28
+ "upload": null,
27
29
  } satisfies FeaturesResponse
28
30
 
29
31
  console.log(example)
@@ -1,7 +1,7 @@
1
1
 
2
2
  # KbTimeseriesResponse
3
3
 
4
- A knowledge-base metric bucketed over time. ``series`` carries one entry per split — two (SOURCE / GENERATED) for ``document_uploads``, one for the ingestion metrics.
4
+ A knowledge-base metric bucketed over time. ``series`` carries one entry per split — two (SOURCE / GENERATED) for ``document_uploads``, one for the ingestion, message, and search metrics.
5
5
 
6
6
  ## Properties
7
7
 
@@ -0,0 +1,38 @@
1
+
2
+ # UploadConstraints
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `formats` | [Array&lt;UploadFormat&gt;](UploadFormat.md)
10
+ `maxBytes` | number
11
+ `maxImageBytes` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { UploadConstraints } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "formats": null,
21
+ "maxBytes": null,
22
+ "maxImageBytes": null,
23
+ } satisfies UploadConstraints
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as UploadConstraints
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -0,0 +1,36 @@
1
+
2
+ # UploadFormat
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `extension` | string
10
+ `contentType` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { UploadFormat } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "extension": null,
20
+ "contentType": null,
21
+ } satisfies UploadFormat
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as UploadFormat
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.147.2",
3
+ "version": "1.149.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -20,6 +20,13 @@ import {
20
20
  SupportedLanguageToJSON,
21
21
  SupportedLanguageToJSONTyped,
22
22
  } from './SupportedLanguage';
23
+ import type { UploadConstraints } from './UploadConstraints';
24
+ import {
25
+ UploadConstraintsFromJSON,
26
+ UploadConstraintsFromJSONTyped,
27
+ UploadConstraintsToJSON,
28
+ UploadConstraintsToJSONTyped,
29
+ } from './UploadConstraints';
23
30
 
24
31
  /**
25
32
  *
@@ -57,6 +64,12 @@ export interface FeaturesResponse {
57
64
  * @memberof FeaturesResponse
58
65
  */
59
66
  defaultFrontendLanguage: SupportedLanguage;
67
+ /**
68
+ *
69
+ * @type {UploadConstraints}
70
+ * @memberof FeaturesResponse
71
+ */
72
+ upload: UploadConstraints;
60
73
  }
61
74
 
62
75
 
@@ -87,6 +100,7 @@ export function instanceOfFeaturesResponse(value: object): value is FeaturesResp
87
100
  if (!('githubLoginEnabled' in value) || value['githubLoginEnabled'] === undefined) return false;
88
101
  if (!('smsLoginEnabled' in value) || value['smsLoginEnabled'] === undefined) return false;
89
102
  if (!('defaultFrontendLanguage' in value) || value['defaultFrontendLanguage'] === undefined) return false;
103
+ if (!('upload' in value) || value['upload'] === undefined) return false;
90
104
  return true;
91
105
  }
92
106
 
@@ -105,6 +119,7 @@ export function FeaturesResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
105
119
  'githubLoginEnabled': json['github_login_enabled'],
106
120
  'smsLoginEnabled': json['sms_login_enabled'],
107
121
  'defaultFrontendLanguage': SupportedLanguageFromJSON(json['default_frontend_language']),
122
+ 'upload': UploadConstraintsFromJSON(json['upload']),
108
123
  };
109
124
  }
110
125
 
@@ -124,6 +139,7 @@ export function FeaturesResponseToJSONTyped(value?: FeaturesResponse | null, ign
124
139
  'github_login_enabled': value['githubLoginEnabled'],
125
140
  'sms_login_enabled': value['smsLoginEnabled'],
126
141
  'default_frontend_language': SupportedLanguageToJSON(value['defaultFrontendLanguage']),
142
+ 'upload': UploadConstraintsToJSON(value['upload']),
127
143
  };
128
144
  }
129
145
 
@@ -20,7 +20,9 @@
20
20
  export const KbMetric = {
21
21
  DocumentUploads: 'document_uploads',
22
22
  IngestionCompleted: 'ingestion_completed',
23
- IngestionFailed: 'ingestion_failed'
23
+ IngestionFailed: 'ingestion_failed',
24
+ Message: 'message',
25
+ Search: 'search'
24
26
  } as const;
25
27
  export type KbMetric = typeof KbMetric[keyof typeof KbMetric];
26
28
 
@@ -39,7 +39,7 @@ import {
39
39
  * A knowledge-base metric bucketed over time.
40
40
  *
41
41
  * ``series`` carries one entry per split — two (SOURCE / GENERATED) for
42
- * ``document_uploads``, one for the ingestion metrics.
42
+ * ``document_uploads``, one for the ingestion, message, and search metrics.
43
43
  * @export
44
44
  * @interface KbTimeseriesResponse
45
45
  */
@@ -65,7 +65,7 @@ export const UpdateWorkflowRunRequestPropertyValidationAttributesMap: {
65
65
  }
66
66
  } = {
67
67
  inputScope: {
68
- maxItems: 50,
68
+ maxItems: 200,
69
69
  uniqueItems: false,
70
70
  },
71
71
  name: {
@@ -0,0 +1,109 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { UploadFormat } from './UploadFormat';
17
+ import {
18
+ UploadFormatFromJSON,
19
+ UploadFormatFromJSONTyped,
20
+ UploadFormatToJSON,
21
+ UploadFormatToJSONTyped,
22
+ } from './UploadFormat';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UploadConstraints
28
+ */
29
+ export interface UploadConstraints {
30
+ /**
31
+ *
32
+ * @type {Array<UploadFormat>}
33
+ * @memberof UploadConstraints
34
+ */
35
+ formats: Array<UploadFormat>;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof UploadConstraints
40
+ */
41
+ maxBytes: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof UploadConstraints
46
+ */
47
+ maxImageBytes: number;
48
+ }
49
+ export const UploadConstraintsPropertyValidationAttributesMap: {
50
+ [property: string]: {
51
+ maxLength?: number,
52
+ minLength?: number,
53
+ pattern?: string,
54
+ maximum?: number,
55
+ exclusiveMaximum?: boolean,
56
+ minimum?: number,
57
+ exclusiveMinimum?: boolean,
58
+ multipleOf?: number,
59
+ maxItems?: number,
60
+ minItems?: number,
61
+ uniqueItems?: boolean
62
+ }
63
+ } = {
64
+ }
65
+
66
+
67
+ /**
68
+ * Check if a given object implements the UploadConstraints interface.
69
+ */
70
+ export function instanceOfUploadConstraints(value: object): value is UploadConstraints {
71
+ if (!('formats' in value) || value['formats'] === undefined) return false;
72
+ if (!('maxBytes' in value) || value['maxBytes'] === undefined) return false;
73
+ if (!('maxImageBytes' in value) || value['maxImageBytes'] === undefined) return false;
74
+ return true;
75
+ }
76
+
77
+ export function UploadConstraintsFromJSON(json: any): UploadConstraints {
78
+ return UploadConstraintsFromJSONTyped(json, false);
79
+ }
80
+
81
+ export function UploadConstraintsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadConstraints {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+
87
+ 'formats': ((json['formats'] as Array<any>).map(UploadFormatFromJSON)),
88
+ 'maxBytes': json['max_bytes'],
89
+ 'maxImageBytes': json['max_image_bytes'],
90
+ };
91
+ }
92
+
93
+ export function UploadConstraintsToJSON(json: any): UploadConstraints {
94
+ return UploadConstraintsToJSONTyped(json, false);
95
+ }
96
+
97
+ export function UploadConstraintsToJSONTyped(value?: UploadConstraints | null, ignoreDiscriminator: boolean = false): any {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+
102
+ return {
103
+
104
+ 'formats': ((value['formats'] as Array<any>).map(UploadFormatToJSON)),
105
+ 'max_bytes': value['maxBytes'],
106
+ 'max_image_bytes': value['maxImageBytes'],
107
+ };
108
+ }
109
+
@@ -0,0 +1,92 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UploadFormat
20
+ */
21
+ export interface UploadFormat {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UploadFormat
26
+ */
27
+ extension: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UploadFormat
32
+ */
33
+ contentType: string;
34
+ }
35
+ export const UploadFormatPropertyValidationAttributesMap: {
36
+ [property: string]: {
37
+ maxLength?: number,
38
+ minLength?: number,
39
+ pattern?: string,
40
+ maximum?: number,
41
+ exclusiveMaximum?: boolean,
42
+ minimum?: number,
43
+ exclusiveMinimum?: boolean,
44
+ multipleOf?: number,
45
+ maxItems?: number,
46
+ minItems?: number,
47
+ uniqueItems?: boolean
48
+ }
49
+ } = {
50
+ }
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the UploadFormat interface.
55
+ */
56
+ export function instanceOfUploadFormat(value: object): value is UploadFormat {
57
+ if (!('extension' in value) || value['extension'] === undefined) return false;
58
+ if (!('contentType' in value) || value['contentType'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function UploadFormatFromJSON(json: any): UploadFormat {
63
+ return UploadFormatFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function UploadFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadFormat {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'extension': json['extension'],
73
+ 'contentType': json['content_type'],
74
+ };
75
+ }
76
+
77
+ export function UploadFormatToJSON(json: any): UploadFormat {
78
+ return UploadFormatToJSONTyped(json, false);
79
+ }
80
+
81
+ export function UploadFormatToJSONTyped(value?: UploadFormat | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'extension': value['extension'],
89
+ 'content_type': value['contentType'],
90
+ };
91
+ }
92
+
@@ -329,6 +329,8 @@ export * from './UpdateThreadRequest';
329
329
  export * from './UpdateUserRequest';
330
330
  export * from './UpdateWorkflowDefinitionRequest';
331
331
  export * from './UpdateWorkflowRunRequest';
332
+ export * from './UploadConstraints';
333
+ export * from './UploadFormat';
332
334
  export * from './UsageMetric';
333
335
  export * from './UserInfo';
334
336
  export * from './UserMessageRequest';