@knowledge-stack/ksapi 3.13.1 → 3.14.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.
Files changed (55) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +6 -2
  3. package/dist/apis/DocumentVersionsApi.d.ts +4 -4
  4. package/dist/apis/DocumentVersionsApi.js +2 -2
  5. package/dist/apis/DocumentsApi.d.ts +4 -4
  6. package/dist/apis/DocumentsApi.js +2 -2
  7. package/dist/apis/SystemJobsApi.d.ts +126 -17
  8. package/dist/apis/SystemJobsApi.js +137 -8
  9. package/dist/esm/apis/DocumentVersionsApi.d.ts +4 -4
  10. package/dist/esm/apis/DocumentVersionsApi.js +2 -2
  11. package/dist/esm/apis/DocumentsApi.d.ts +4 -4
  12. package/dist/esm/apis/DocumentsApi.js +2 -2
  13. package/dist/esm/apis/SystemJobsApi.d.ts +126 -17
  14. package/dist/esm/apis/SystemJobsApi.js +138 -9
  15. package/dist/esm/models/BulkFailureReason.d.ts +3 -0
  16. package/dist/esm/models/BulkFailureReason.js +4 -1
  17. package/dist/esm/models/BulkRerunRequest.d.ts +47 -0
  18. package/dist/esm/models/BulkRerunRequest.js +42 -0
  19. package/dist/esm/models/PaginatedResponseUserInfo.d.ts +66 -0
  20. package/dist/esm/models/PaginatedResponseUserInfo.js +70 -0
  21. package/dist/esm/models/WorkflowDetailResponse.d.ts +26 -1
  22. package/dist/esm/models/WorkflowDetailResponse.js +17 -0
  23. package/dist/esm/models/WorkflowSummaryResponse.d.ts +26 -1
  24. package/dist/esm/models/WorkflowSummaryResponse.js +17 -0
  25. package/dist/esm/models/index.d.ts +2 -0
  26. package/dist/esm/models/index.js +2 -0
  27. package/dist/models/BulkFailureReason.d.ts +3 -0
  28. package/dist/models/BulkFailureReason.js +4 -1
  29. package/dist/models/BulkRerunRequest.d.ts +47 -0
  30. package/dist/models/BulkRerunRequest.js +50 -0
  31. package/dist/models/PaginatedResponseUserInfo.d.ts +66 -0
  32. package/dist/models/PaginatedResponseUserInfo.js +78 -0
  33. package/dist/models/WorkflowDetailResponse.d.ts +26 -1
  34. package/dist/models/WorkflowDetailResponse.js +17 -0
  35. package/dist/models/WorkflowSummaryResponse.d.ts +26 -1
  36. package/dist/models/WorkflowSummaryResponse.js +17 -0
  37. package/dist/models/index.d.ts +2 -0
  38. package/dist/models/index.js +2 -0
  39. package/docs/BulkRerunRequest.md +35 -0
  40. package/docs/DocumentVersionsApi.md +1 -1
  41. package/docs/DocumentsApi.md +1 -1
  42. package/docs/PaginatedResponseUserInfo.md +40 -0
  43. package/docs/SystemJobsApi.md +190 -5
  44. package/docs/WorkflowDetailResponse.md +8 -0
  45. package/docs/WorkflowSummaryResponse.md +8 -0
  46. package/package.json +1 -1
  47. package/src/apis/DocumentVersionsApi.ts +4 -4
  48. package/src/apis/DocumentsApi.ts +4 -4
  49. package/src/apis/SystemJobsApi.ts +272 -16
  50. package/src/models/BulkFailureReason.ts +4 -1
  51. package/src/models/BulkRerunRequest.ts +82 -0
  52. package/src/models/PaginatedResponseUserInfo.ts +130 -0
  53. package/src/models/WorkflowDetailResponse.ts +44 -1
  54. package/src/models/WorkflowSummaryResponse.ts +44 -1
  55. package/src/models/index.ts +2 -0
@@ -0,0 +1,66 @@
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 { UserInfo } from './UserInfo';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseUserInfo
17
+ */
18
+ export interface PaginatedResponseUserInfo {
19
+ /**
20
+ * List of items
21
+ * @type {Array<UserInfo>}
22
+ * @memberof PaginatedResponseUserInfo
23
+ */
24
+ items: Array<UserInfo>;
25
+ /**
26
+ * Total number of items
27
+ * @type {number}
28
+ * @memberof PaginatedResponseUserInfo
29
+ */
30
+ total: number;
31
+ /**
32
+ * Number of items per page
33
+ * @type {number}
34
+ * @memberof PaginatedResponseUserInfo
35
+ */
36
+ limit: number;
37
+ /**
38
+ * Number of items to skip
39
+ * @type {number}
40
+ * @memberof PaginatedResponseUserInfo
41
+ */
42
+ offset: number;
43
+ }
44
+ export declare const PaginatedResponseUserInfoPropertyValidationAttributesMap: {
45
+ [property: string]: {
46
+ maxLength?: number;
47
+ minLength?: number;
48
+ pattern?: string;
49
+ maximum?: number;
50
+ exclusiveMaximum?: boolean;
51
+ minimum?: number;
52
+ exclusiveMinimum?: boolean;
53
+ multipleOf?: number;
54
+ maxItems?: number;
55
+ minItems?: number;
56
+ uniqueItems?: boolean;
57
+ };
58
+ };
59
+ /**
60
+ * Check if a given object implements the PaginatedResponseUserInfo interface.
61
+ */
62
+ export declare function instanceOfPaginatedResponseUserInfo(value: object): value is PaginatedResponseUserInfo;
63
+ export declare function PaginatedResponseUserInfoFromJSON(json: any): PaginatedResponseUserInfo;
64
+ export declare function PaginatedResponseUserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseUserInfo;
65
+ export declare function PaginatedResponseUserInfoToJSON(json: any): PaginatedResponseUserInfo;
66
+ export declare function PaginatedResponseUserInfoToJSONTyped(value?: PaginatedResponseUserInfo | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
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 { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
15
+ export const PaginatedResponseUserInfoPropertyValidationAttributesMap = {
16
+ total: {
17
+ minimum: 0,
18
+ exclusiveMinimum: false,
19
+ },
20
+ limit: {
21
+ minimum: 1,
22
+ exclusiveMinimum: false,
23
+ },
24
+ offset: {
25
+ minimum: 0,
26
+ exclusiveMinimum: false,
27
+ },
28
+ };
29
+ /**
30
+ * Check if a given object implements the PaginatedResponseUserInfo interface.
31
+ */
32
+ export function instanceOfPaginatedResponseUserInfo(value) {
33
+ if (!('items' in value) || value['items'] === undefined)
34
+ return false;
35
+ if (!('total' in value) || value['total'] === undefined)
36
+ return false;
37
+ if (!('limit' in value) || value['limit'] === undefined)
38
+ return false;
39
+ if (!('offset' in value) || value['offset'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ export function PaginatedResponseUserInfoFromJSON(json) {
44
+ return PaginatedResponseUserInfoFromJSONTyped(json, false);
45
+ }
46
+ export function PaginatedResponseUserInfoFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'items': (json['items'].map(UserInfoFromJSON)),
52
+ 'total': json['total'],
53
+ 'limit': json['limit'],
54
+ 'offset': json['offset'],
55
+ };
56
+ }
57
+ export function PaginatedResponseUserInfoToJSON(json) {
58
+ return PaginatedResponseUserInfoToJSONTyped(json, false);
59
+ }
60
+ export function PaginatedResponseUserInfoToJSONTyped(value, ignoreDiscriminator = false) {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+ 'items': (value['items'].map(UserInfoToJSON)),
66
+ 'total': value['total'],
67
+ 'limit': value['limit'],
68
+ 'offset': value['offset'],
69
+ };
70
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PipelineStatus } from './PipelineStatus';
13
+ import type { UserInfo } from './UserInfo';
13
14
  /**
14
15
  * Single item - adds live Temporal fields.
15
16
  * @export
@@ -28,12 +29,36 @@ export interface WorkflowDetailResponse {
28
29
  * @memberof WorkflowDetailResponse
29
30
  */
30
31
  documentId: string;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof WorkflowDetailResponse
36
+ */
37
+ documentName: string;
38
+ /**
39
+ * The document's path
40
+ * @type {string}
41
+ * @memberof WorkflowDetailResponse
42
+ */
43
+ materializedPath: string;
31
44
  /**
32
45
  *
33
46
  * @type {string}
34
47
  * @memberof WorkflowDetailResponse
35
48
  */
36
49
  documentVersionId: string;
50
+ /**
51
+ * Whether this version is the document's active one; false for an unfinished newer upload and for a superseded older version
52
+ * @type {boolean}
53
+ * @memberof WorkflowDetailResponse
54
+ */
55
+ isActiveVersion: boolean;
56
+ /**
57
+ *
58
+ * @type {UserInfo}
59
+ * @memberof WorkflowDetailResponse
60
+ */
61
+ uploader: UserInfo;
37
62
  /**
38
63
  *
39
64
  * @type {PipelineStatus}
@@ -53,7 +78,7 @@ export interface WorkflowDetailResponse {
53
78
  */
54
79
  error?: string | null;
55
80
  /**
56
- *
81
+ * When the last run started; the upload time until a run has started
57
82
  * @type {Date}
58
83
  * @memberof WorkflowDetailResponse
59
84
  */
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus';
15
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
15
16
  export const WorkflowDetailResponsePropertyValidationAttributesMap = {};
16
17
  /**
17
18
  * Check if a given object implements the WorkflowDetailResponse interface.
@@ -21,8 +22,16 @@ export function instanceOfWorkflowDetailResponse(value) {
21
22
  return false;
22
23
  if (!('documentId' in value) || value['documentId'] === undefined)
23
24
  return false;
25
+ if (!('documentName' in value) || value['documentName'] === undefined)
26
+ return false;
27
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
28
+ return false;
24
29
  if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
25
30
  return false;
31
+ if (!('isActiveVersion' in value) || value['isActiveVersion'] === undefined)
32
+ return false;
33
+ if (!('uploader' in value) || value['uploader'] === undefined)
34
+ return false;
26
35
  if (!('status' in value) || value['status'] === undefined)
27
36
  return false;
28
37
  if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined)
@@ -51,7 +60,11 @@ export function WorkflowDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
51
60
  return {
52
61
  'workflowId': json['workflow_id'],
53
62
  'documentId': json['document_id'],
63
+ 'documentName': json['document_name'],
64
+ 'materializedPath': json['materialized_path'],
54
65
  'documentVersionId': json['document_version_id'],
66
+ 'isActiveVersion': json['is_active_version'],
67
+ 'uploader': UserInfoFromJSON(json['uploader']),
55
68
  'status': PipelineStatusFromJSON(json['status']),
56
69
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
57
70
  'error': json['error'] == null ? undefined : json['error'],
@@ -77,7 +90,11 @@ export function WorkflowDetailResponseToJSONTyped(value, ignoreDiscriminator = f
77
90
  return {
78
91
  'workflow_id': value['workflowId'],
79
92
  'document_id': value['documentId'],
93
+ 'document_name': value['documentName'],
94
+ 'materialized_path': value['materializedPath'],
80
95
  'document_version_id': value['documentVersionId'],
96
+ 'is_active_version': value['isActiveVersion'],
97
+ 'uploader': UserInfoToJSON(value['uploader']),
81
98
  'status': PipelineStatusToJSON(value['status']),
82
99
  'last_activity': value['lastActivity'],
83
100
  'error': value['error'],
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { PipelineStatus } from './PipelineStatus';
13
+ import type { UserInfo } from './UserInfo';
13
14
  /**
14
15
  * List item - DB-only fields, no Temporal call per item.
15
16
  * @export
@@ -28,12 +29,36 @@ export interface WorkflowSummaryResponse {
28
29
  * @memberof WorkflowSummaryResponse
29
30
  */
30
31
  documentId: string;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof WorkflowSummaryResponse
36
+ */
37
+ documentName: string;
38
+ /**
39
+ * The document's path
40
+ * @type {string}
41
+ * @memberof WorkflowSummaryResponse
42
+ */
43
+ materializedPath: string;
31
44
  /**
32
45
  *
33
46
  * @type {string}
34
47
  * @memberof WorkflowSummaryResponse
35
48
  */
36
49
  documentVersionId: string;
50
+ /**
51
+ * Whether this version is the document's active one; false for an unfinished newer upload and for a superseded older version
52
+ * @type {boolean}
53
+ * @memberof WorkflowSummaryResponse
54
+ */
55
+ isActiveVersion: boolean;
56
+ /**
57
+ *
58
+ * @type {UserInfo}
59
+ * @memberof WorkflowSummaryResponse
60
+ */
61
+ uploader: UserInfo;
37
62
  /**
38
63
  *
39
64
  * @type {PipelineStatus}
@@ -53,7 +78,7 @@ export interface WorkflowSummaryResponse {
53
78
  */
54
79
  error?: string | null;
55
80
  /**
56
- *
81
+ * When the last run started; the upload time until a run has started
57
82
  * @type {Date}
58
83
  * @memberof WorkflowSummaryResponse
59
84
  */
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { PipelineStatusFromJSON, PipelineStatusToJSON, } from './PipelineStatus';
15
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
15
16
  export const WorkflowSummaryResponsePropertyValidationAttributesMap = {};
16
17
  /**
17
18
  * Check if a given object implements the WorkflowSummaryResponse interface.
@@ -21,8 +22,16 @@ export function instanceOfWorkflowSummaryResponse(value) {
21
22
  return false;
22
23
  if (!('documentId' in value) || value['documentId'] === undefined)
23
24
  return false;
25
+ if (!('documentName' in value) || value['documentName'] === undefined)
26
+ return false;
27
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
28
+ return false;
24
29
  if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
25
30
  return false;
31
+ if (!('isActiveVersion' in value) || value['isActiveVersion'] === undefined)
32
+ return false;
33
+ if (!('uploader' in value) || value['uploader'] === undefined)
34
+ return false;
26
35
  if (!('status' in value) || value['status'] === undefined)
27
36
  return false;
28
37
  if (!('lastRunTimestamp' in value) || value['lastRunTimestamp'] === undefined)
@@ -41,7 +50,11 @@ export function WorkflowSummaryResponseFromJSONTyped(json, ignoreDiscriminator)
41
50
  return {
42
51
  'workflowId': json['workflow_id'],
43
52
  'documentId': json['document_id'],
53
+ 'documentName': json['document_name'],
54
+ 'materializedPath': json['materialized_path'],
44
55
  'documentVersionId': json['document_version_id'],
56
+ 'isActiveVersion': json['is_active_version'],
57
+ 'uploader': UserInfoFromJSON(json['uploader']),
45
58
  'status': PipelineStatusFromJSON(json['status']),
46
59
  'lastActivity': json['last_activity'] == null ? undefined : json['last_activity'],
47
60
  'error': json['error'] == null ? undefined : json['error'],
@@ -60,7 +73,11 @@ export function WorkflowSummaryResponseToJSONTyped(value, ignoreDiscriminator =
60
73
  return {
61
74
  'workflow_id': value['workflowId'],
62
75
  'document_id': value['documentId'],
76
+ 'document_name': value['documentName'],
77
+ 'materialized_path': value['materializedPath'],
63
78
  'document_version_id': value['documentVersionId'],
79
+ 'is_active_version': value['isActiveVersion'],
80
+ 'uploader': UserInfoToJSON(value['uploader']),
64
81
  'status': PipelineStatusToJSON(value['status']),
65
82
  'last_activity': value['lastActivity'],
66
83
  'error': value['error'],
@@ -35,6 +35,7 @@ export * from './BulkModelTablesRequest';
35
35
  export * from './BulkModelTablesResponse';
36
36
  export * from './BulkMoveRequest';
37
37
  export * from './BulkOperationResponse';
38
+ export * from './BulkRerunRequest';
38
39
  export * from './BulkRevokeRequest';
39
40
  export * from './BulkTagRequest';
40
41
  export * from './BulkTrashRequest';
@@ -235,6 +236,7 @@ export * from './PaginatedResponseTenantUserResponse';
235
236
  export * from './PaginatedResponseThreadMessageResponse';
236
237
  export * from './PaginatedResponseThreadResponse';
237
238
  export * from './PaginatedResponseTrashItemResponse';
239
+ export * from './PaginatedResponseUserInfo';
238
240
  export * from './PaginatedResponseWorkflowDefinitionResponse';
239
241
  export * from './PaginatedResponseWorkflowRunResponse';
240
242
  export * from './PaginatedResponseWorkflowSummaryResponse';
@@ -37,6 +37,7 @@ export * from './BulkModelTablesRequest';
37
37
  export * from './BulkModelTablesResponse';
38
38
  export * from './BulkMoveRequest';
39
39
  export * from './BulkOperationResponse';
40
+ export * from './BulkRerunRequest';
40
41
  export * from './BulkRevokeRequest';
41
42
  export * from './BulkTagRequest';
42
43
  export * from './BulkTrashRequest';
@@ -237,6 +238,7 @@ export * from './PaginatedResponseTenantUserResponse';
237
238
  export * from './PaginatedResponseThreadMessageResponse';
238
239
  export * from './PaginatedResponseThreadResponse';
239
240
  export * from './PaginatedResponseTrashItemResponse';
241
+ export * from './PaginatedResponseUserInfo';
240
242
  export * from './PaginatedResponseWorkflowDefinitionResponse';
241
243
  export * from './PaginatedResponseWorkflowRunResponse';
242
244
  export * from './PaginatedResponseWorkflowSummaryResponse';
@@ -28,6 +28,9 @@ export declare const BulkFailureReason: {
28
28
  readonly NameConflict: 'name_conflict';
29
29
  readonly InProgressWorkflow: 'in_progress_workflow';
30
30
  readonly PermissionLimit: 'permission_limit';
31
+ readonly AlreadyIngested: 'already_ingested';
32
+ readonly UnsupportedDocumentType: 'unsupported_document_type';
33
+ readonly Superseded: 'superseded';
31
34
  };
32
35
  export type BulkFailureReason = typeof BulkFailureReason[keyof typeof BulkFailureReason];
33
36
  export declare function instanceOfBulkFailureReason(value: any): boolean;
@@ -37,7 +37,10 @@ exports.BulkFailureReason = {
37
37
  CheckedOut: 'checked_out',
38
38
  NameConflict: 'name_conflict',
39
39
  InProgressWorkflow: 'in_progress_workflow',
40
- PermissionLimit: 'permission_limit'
40
+ PermissionLimit: 'permission_limit',
41
+ AlreadyIngested: 'already_ingested',
42
+ UnsupportedDocumentType: 'unsupported_document_type',
43
+ Superseded: 'superseded'
41
44
  };
42
45
  function instanceOfBulkFailureReason(value) {
43
46
  for (const key in exports.BulkFailureReason) {
@@ -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
+ * Re-run ingestion for the selected document versions.
14
+ * @export
15
+ * @interface BulkRerunRequest
16
+ */
17
+ export interface BulkRerunRequest {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof BulkRerunRequest
22
+ */
23
+ documentVersionIds?: Array<string>;
24
+ }
25
+ export declare const BulkRerunRequestPropertyValidationAttributesMap: {
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 BulkRerunRequest interface.
42
+ */
43
+ export declare function instanceOfBulkRerunRequest(value: object): value is BulkRerunRequest;
44
+ export declare function BulkRerunRequestFromJSON(json: any): BulkRerunRequest;
45
+ export declare function BulkRerunRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkRerunRequest;
46
+ export declare function BulkRerunRequestToJSON(json: any): BulkRerunRequest;
47
+ export declare function BulkRerunRequestToJSONTyped(value?: BulkRerunRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.BulkRerunRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkRerunRequest = instanceOfBulkRerunRequest;
18
+ exports.BulkRerunRequestFromJSON = BulkRerunRequestFromJSON;
19
+ exports.BulkRerunRequestFromJSONTyped = BulkRerunRequestFromJSONTyped;
20
+ exports.BulkRerunRequestToJSON = BulkRerunRequestToJSON;
21
+ exports.BulkRerunRequestToJSONTyped = BulkRerunRequestToJSONTyped;
22
+ exports.BulkRerunRequestPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the BulkRerunRequest interface.
25
+ */
26
+ function instanceOfBulkRerunRequest(value) {
27
+ return true;
28
+ }
29
+ function BulkRerunRequestFromJSON(json) {
30
+ return BulkRerunRequestFromJSONTyped(json, false);
31
+ }
32
+ function BulkRerunRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'documentVersionIds': json['document_version_ids'] == null ? undefined : json['document_version_ids'],
38
+ };
39
+ }
40
+ function BulkRerunRequestToJSON(json) {
41
+ return BulkRerunRequestToJSONTyped(json, false);
42
+ }
43
+ function BulkRerunRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'document_version_ids': value['documentVersionIds'],
49
+ };
50
+ }
@@ -0,0 +1,66 @@
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 { UserInfo } from './UserInfo';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseUserInfo
17
+ */
18
+ export interface PaginatedResponseUserInfo {
19
+ /**
20
+ * List of items
21
+ * @type {Array<UserInfo>}
22
+ * @memberof PaginatedResponseUserInfo
23
+ */
24
+ items: Array<UserInfo>;
25
+ /**
26
+ * Total number of items
27
+ * @type {number}
28
+ * @memberof PaginatedResponseUserInfo
29
+ */
30
+ total: number;
31
+ /**
32
+ * Number of items per page
33
+ * @type {number}
34
+ * @memberof PaginatedResponseUserInfo
35
+ */
36
+ limit: number;
37
+ /**
38
+ * Number of items to skip
39
+ * @type {number}
40
+ * @memberof PaginatedResponseUserInfo
41
+ */
42
+ offset: number;
43
+ }
44
+ export declare const PaginatedResponseUserInfoPropertyValidationAttributesMap: {
45
+ [property: string]: {
46
+ maxLength?: number;
47
+ minLength?: number;
48
+ pattern?: string;
49
+ maximum?: number;
50
+ exclusiveMaximum?: boolean;
51
+ minimum?: number;
52
+ exclusiveMinimum?: boolean;
53
+ multipleOf?: number;
54
+ maxItems?: number;
55
+ minItems?: number;
56
+ uniqueItems?: boolean;
57
+ };
58
+ };
59
+ /**
60
+ * Check if a given object implements the PaginatedResponseUserInfo interface.
61
+ */
62
+ export declare function instanceOfPaginatedResponseUserInfo(value: object): value is PaginatedResponseUserInfo;
63
+ export declare function PaginatedResponseUserInfoFromJSON(json: any): PaginatedResponseUserInfo;
64
+ export declare function PaginatedResponseUserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseUserInfo;
65
+ export declare function PaginatedResponseUserInfoToJSON(json: any): PaginatedResponseUserInfo;
66
+ export declare function PaginatedResponseUserInfoToJSONTyped(value?: PaginatedResponseUserInfo | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,78 @@
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.PaginatedResponseUserInfoPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfPaginatedResponseUserInfo = instanceOfPaginatedResponseUserInfo;
18
+ exports.PaginatedResponseUserInfoFromJSON = PaginatedResponseUserInfoFromJSON;
19
+ exports.PaginatedResponseUserInfoFromJSONTyped = PaginatedResponseUserInfoFromJSONTyped;
20
+ exports.PaginatedResponseUserInfoToJSON = PaginatedResponseUserInfoToJSON;
21
+ exports.PaginatedResponseUserInfoToJSONTyped = PaginatedResponseUserInfoToJSONTyped;
22
+ const UserInfo_1 = require("./UserInfo");
23
+ exports.PaginatedResponseUserInfoPropertyValidationAttributesMap = {
24
+ total: {
25
+ minimum: 0,
26
+ exclusiveMinimum: false,
27
+ },
28
+ limit: {
29
+ minimum: 1,
30
+ exclusiveMinimum: false,
31
+ },
32
+ offset: {
33
+ minimum: 0,
34
+ exclusiveMinimum: false,
35
+ },
36
+ };
37
+ /**
38
+ * Check if a given object implements the PaginatedResponseUserInfo interface.
39
+ */
40
+ function instanceOfPaginatedResponseUserInfo(value) {
41
+ if (!('items' in value) || value['items'] === undefined)
42
+ return false;
43
+ if (!('total' in value) || value['total'] === undefined)
44
+ return false;
45
+ if (!('limit' in value) || value['limit'] === undefined)
46
+ return false;
47
+ if (!('offset' in value) || value['offset'] === undefined)
48
+ return false;
49
+ return true;
50
+ }
51
+ function PaginatedResponseUserInfoFromJSON(json) {
52
+ return PaginatedResponseUserInfoFromJSONTyped(json, false);
53
+ }
54
+ function PaginatedResponseUserInfoFromJSONTyped(json, ignoreDiscriminator) {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+ 'items': (json['items'].map(UserInfo_1.UserInfoFromJSON)),
60
+ 'total': json['total'],
61
+ 'limit': json['limit'],
62
+ 'offset': json['offset'],
63
+ };
64
+ }
65
+ function PaginatedResponseUserInfoToJSON(json) {
66
+ return PaginatedResponseUserInfoToJSONTyped(json, false);
67
+ }
68
+ function PaginatedResponseUserInfoToJSONTyped(value, ignoreDiscriminator = false) {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+ 'items': (value['items'].map(UserInfo_1.UserInfoToJSON)),
74
+ 'total': value['total'],
75
+ 'limit': value['limit'],
76
+ 'offset': value['offset'],
77
+ };
78
+ }