@knowledge-stack/ksapi 1.154.1 → 1.156.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 (132) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/README.md +20 -2
  3. package/dist/apis/BulkDeleteApi.d.ts +64 -0
  4. package/dist/apis/BulkDeleteApi.js +115 -0
  5. package/dist/apis/BulkMoveApi.d.ts +64 -0
  6. package/dist/apis/BulkMoveApi.js +115 -0
  7. package/dist/apis/TrashApi.d.ts +77 -1
  8. package/dist/apis/TrashApi.js +98 -0
  9. package/dist/apis/UserPermissionsApi.d.ts +77 -1
  10. package/dist/apis/UserPermissionsApi.js +98 -0
  11. package/dist/apis/index.d.ts +2 -0
  12. package/dist/apis/index.js +2 -0
  13. package/dist/esm/apis/BulkDeleteApi.d.ts +64 -0
  14. package/dist/esm/apis/BulkDeleteApi.js +78 -0
  15. package/dist/esm/apis/BulkMoveApi.d.ts +64 -0
  16. package/dist/esm/apis/BulkMoveApi.js +78 -0
  17. package/dist/esm/apis/TrashApi.d.ts +77 -1
  18. package/dist/esm/apis/TrashApi.js +99 -1
  19. package/dist/esm/apis/UserPermissionsApi.d.ts +77 -1
  20. package/dist/esm/apis/UserPermissionsApi.js +99 -1
  21. package/dist/esm/apis/index.d.ts +2 -0
  22. package/dist/esm/apis/index.js +2 -0
  23. package/dist/esm/models/BulkDeleteRequest.d.ts +53 -0
  24. package/dist/esm/models/BulkDeleteRequest.js +44 -0
  25. package/dist/esm/models/BulkFailureReason.d.ts +37 -0
  26. package/dist/esm/models/BulkFailureReason.js +55 -0
  27. package/dist/esm/models/BulkGrantItem.d.ts +66 -0
  28. package/dist/esm/models/BulkGrantItem.js +55 -0
  29. package/dist/esm/models/BulkGrantItemFailure.d.ts +60 -0
  30. package/dist/esm/models/BulkGrantItemFailure.js +53 -0
  31. package/dist/esm/models/BulkGrantRequest.d.ts +54 -0
  32. package/dist/esm/models/BulkGrantRequest.js +47 -0
  33. package/dist/esm/models/BulkGrantResponse.d.ts +55 -0
  34. package/dist/esm/models/BulkGrantResponse.js +46 -0
  35. package/dist/esm/models/BulkGrantSuccess.d.ts +72 -0
  36. package/dist/esm/models/BulkGrantSuccess.js +61 -0
  37. package/dist/esm/models/BulkItemFailure.d.ts +54 -0
  38. package/dist/esm/models/BulkItemFailure.js +49 -0
  39. package/dist/esm/models/BulkMoveRequest.d.ts +59 -0
  40. package/dist/esm/models/BulkMoveRequest.js +48 -0
  41. package/dist/esm/models/BulkOperationResponse.d.ts +54 -0
  42. package/dist/esm/models/BulkOperationResponse.js +45 -0
  43. package/dist/esm/models/BulkRevokeRequest.d.ts +53 -0
  44. package/dist/esm/models/BulkRevokeRequest.js +46 -0
  45. package/dist/esm/models/BulkTrashRequest.d.ts +47 -0
  46. package/dist/esm/models/BulkTrashRequest.js +42 -0
  47. package/dist/esm/models/CreateUploadRequest.d.ts +6 -0
  48. package/dist/esm/models/CreateUploadRequest.js +2 -0
  49. package/dist/esm/models/DocumentVersionMetadata.d.ts +18 -0
  50. package/dist/esm/models/DocumentVersionMetadata.js +6 -0
  51. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +18 -0
  52. package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -0
  53. package/dist/esm/models/ErrorResponse.d.ts +1 -0
  54. package/dist/esm/models/ErrorResponse.js +1 -0
  55. package/dist/esm/models/index.d.ts +12 -0
  56. package/dist/esm/models/index.js +12 -0
  57. package/dist/models/BulkDeleteRequest.d.ts +53 -0
  58. package/dist/models/BulkDeleteRequest.js +52 -0
  59. package/dist/models/BulkFailureReason.d.ts +37 -0
  60. package/dist/models/BulkFailureReason.js +63 -0
  61. package/dist/models/BulkGrantItem.d.ts +66 -0
  62. package/dist/models/BulkGrantItem.js +63 -0
  63. package/dist/models/BulkGrantItemFailure.d.ts +60 -0
  64. package/dist/models/BulkGrantItemFailure.js +61 -0
  65. package/dist/models/BulkGrantRequest.d.ts +54 -0
  66. package/dist/models/BulkGrantRequest.js +55 -0
  67. package/dist/models/BulkGrantResponse.d.ts +55 -0
  68. package/dist/models/BulkGrantResponse.js +54 -0
  69. package/dist/models/BulkGrantSuccess.d.ts +72 -0
  70. package/dist/models/BulkGrantSuccess.js +69 -0
  71. package/dist/models/BulkItemFailure.d.ts +54 -0
  72. package/dist/models/BulkItemFailure.js +57 -0
  73. package/dist/models/BulkMoveRequest.d.ts +59 -0
  74. package/dist/models/BulkMoveRequest.js +56 -0
  75. package/dist/models/BulkOperationResponse.d.ts +54 -0
  76. package/dist/models/BulkOperationResponse.js +53 -0
  77. package/dist/models/BulkRevokeRequest.d.ts +53 -0
  78. package/dist/models/BulkRevokeRequest.js +54 -0
  79. package/dist/models/BulkTrashRequest.d.ts +47 -0
  80. package/dist/models/BulkTrashRequest.js +50 -0
  81. package/dist/models/CreateUploadRequest.d.ts +6 -0
  82. package/dist/models/CreateUploadRequest.js +2 -0
  83. package/dist/models/DocumentVersionMetadata.d.ts +18 -0
  84. package/dist/models/DocumentVersionMetadata.js +6 -0
  85. package/dist/models/DocumentVersionMetadataUpdate.d.ts +18 -0
  86. package/dist/models/DocumentVersionMetadataUpdate.js +6 -0
  87. package/dist/models/ErrorResponse.d.ts +1 -0
  88. package/dist/models/ErrorResponse.js +1 -0
  89. package/dist/models/index.d.ts +12 -0
  90. package/dist/models/index.js +12 -0
  91. package/docs/BulkDeleteApi.md +84 -0
  92. package/docs/BulkDeleteRequest.md +37 -0
  93. package/docs/BulkFailureReason.md +33 -0
  94. package/docs/BulkGrantItem.md +41 -0
  95. package/docs/BulkGrantItemFailure.md +39 -0
  96. package/docs/BulkGrantRequest.md +37 -0
  97. package/docs/BulkGrantResponse.md +37 -0
  98. package/docs/BulkGrantSuccess.md +43 -0
  99. package/docs/BulkItemFailure.md +37 -0
  100. package/docs/BulkMoveApi.md +84 -0
  101. package/docs/BulkMoveRequest.md +39 -0
  102. package/docs/BulkOperationResponse.md +37 -0
  103. package/docs/BulkRevokeRequest.md +37 -0
  104. package/docs/BulkTrashRequest.md +35 -0
  105. package/docs/CreateUploadRequest.md +2 -0
  106. package/docs/DocumentVersionMetadata.md +6 -0
  107. package/docs/DocumentVersionMetadataUpdate.md +6 -0
  108. package/docs/TrashApi.md +152 -0
  109. package/docs/UserPermissionsApi.md +152 -0
  110. package/package.json +1 -1
  111. package/src/apis/BulkDeleteApi.ts +133 -0
  112. package/src/apis/BulkMoveApi.ts +133 -0
  113. package/src/apis/TrashApi.ts +176 -0
  114. package/src/apis/UserPermissionsApi.ts +182 -0
  115. package/src/apis/index.ts +2 -0
  116. package/src/models/BulkDeleteRequest.ts +90 -0
  117. package/src/models/BulkFailureReason.ts +65 -0
  118. package/src/models/BulkGrantItem.ts +119 -0
  119. package/src/models/BulkGrantItemFailure.ts +111 -0
  120. package/src/models/BulkGrantRequest.ts +99 -0
  121. package/src/models/BulkGrantResponse.ts +105 -0
  122. package/src/models/BulkGrantSuccess.ts +129 -0
  123. package/src/models/BulkItemFailure.ts +102 -0
  124. package/src/models/BulkMoveRequest.ts +99 -0
  125. package/src/models/BulkOperationResponse.ts +98 -0
  126. package/src/models/BulkRevokeRequest.ts +91 -0
  127. package/src/models/BulkTrashRequest.ts +82 -0
  128. package/src/models/CreateUploadRequest.ts +8 -0
  129. package/src/models/DocumentVersionMetadata.ts +24 -0
  130. package/src/models/DocumentVersionMetadataUpdate.ts +24 -0
  131. package/src/models/ErrorResponse.ts +1 -0
  132. package/src/models/index.ts +12 -0
@@ -0,0 +1,55 @@
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.BulkGrantRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkGrantRequest = instanceOfBulkGrantRequest;
18
+ exports.BulkGrantRequestFromJSON = BulkGrantRequestFromJSON;
19
+ exports.BulkGrantRequestFromJSONTyped = BulkGrantRequestFromJSONTyped;
20
+ exports.BulkGrantRequestToJSON = BulkGrantRequestToJSON;
21
+ exports.BulkGrantRequestToJSONTyped = BulkGrantRequestToJSONTyped;
22
+ const BulkGrantItem_1 = require("./BulkGrantItem");
23
+ exports.BulkGrantRequestPropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the BulkGrantRequest interface.
26
+ */
27
+ function instanceOfBulkGrantRequest(value) {
28
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function BulkGrantRequestFromJSON(json) {
33
+ return BulkGrantRequestFromJSONTyped(json, false);
34
+ }
35
+ function BulkGrantRequestFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'tenantId': json['tenant_id'],
41
+ 'grants': json['grants'] == null ? undefined : (json['grants'].map(BulkGrantItem_1.BulkGrantItemFromJSON)),
42
+ };
43
+ }
44
+ function BulkGrantRequestToJSON(json) {
45
+ return BulkGrantRequestToJSONTyped(json, false);
46
+ }
47
+ function BulkGrantRequestToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'tenant_id': value['tenantId'],
53
+ 'grants': value['grants'] == null ? undefined : (value['grants'].map(BulkGrantItem_1.BulkGrantItemToJSON)),
54
+ };
55
+ }
@@ -0,0 +1,55 @@
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 { BulkGrantItemFailure } from './BulkGrantItemFailure';
13
+ import type { BulkGrantSuccess } from './BulkGrantSuccess';
14
+ /**
15
+ * Per-item outcome of a bulk grant (composite-keyed, unlike other bulks).
16
+ * @export
17
+ * @interface BulkGrantResponse
18
+ */
19
+ export interface BulkGrantResponse {
20
+ /**
21
+ *
22
+ * @type {Array<BulkGrantSuccess>}
23
+ * @memberof BulkGrantResponse
24
+ */
25
+ succeeded?: Array<BulkGrantSuccess>;
26
+ /**
27
+ *
28
+ * @type {Array<BulkGrantItemFailure>}
29
+ * @memberof BulkGrantResponse
30
+ */
31
+ failed?: Array<BulkGrantItemFailure>;
32
+ }
33
+ export declare const BulkGrantResponsePropertyValidationAttributesMap: {
34
+ [property: string]: {
35
+ maxLength?: number;
36
+ minLength?: number;
37
+ pattern?: string;
38
+ maximum?: number;
39
+ exclusiveMaximum?: boolean;
40
+ minimum?: number;
41
+ exclusiveMinimum?: boolean;
42
+ multipleOf?: number;
43
+ maxItems?: number;
44
+ minItems?: number;
45
+ uniqueItems?: boolean;
46
+ };
47
+ };
48
+ /**
49
+ * Check if a given object implements the BulkGrantResponse interface.
50
+ */
51
+ export declare function instanceOfBulkGrantResponse(value: object): value is BulkGrantResponse;
52
+ export declare function BulkGrantResponseFromJSON(json: any): BulkGrantResponse;
53
+ export declare function BulkGrantResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantResponse;
54
+ export declare function BulkGrantResponseToJSON(json: any): BulkGrantResponse;
55
+ export declare function BulkGrantResponseToJSONTyped(value?: BulkGrantResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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.BulkGrantResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkGrantResponse = instanceOfBulkGrantResponse;
18
+ exports.BulkGrantResponseFromJSON = BulkGrantResponseFromJSON;
19
+ exports.BulkGrantResponseFromJSONTyped = BulkGrantResponseFromJSONTyped;
20
+ exports.BulkGrantResponseToJSON = BulkGrantResponseToJSON;
21
+ exports.BulkGrantResponseToJSONTyped = BulkGrantResponseToJSONTyped;
22
+ const BulkGrantItemFailure_1 = require("./BulkGrantItemFailure");
23
+ const BulkGrantSuccess_1 = require("./BulkGrantSuccess");
24
+ exports.BulkGrantResponsePropertyValidationAttributesMap = {};
25
+ /**
26
+ * Check if a given object implements the BulkGrantResponse interface.
27
+ */
28
+ function instanceOfBulkGrantResponse(value) {
29
+ return true;
30
+ }
31
+ function BulkGrantResponseFromJSON(json) {
32
+ return BulkGrantResponseFromJSONTyped(json, false);
33
+ }
34
+ function BulkGrantResponseFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'succeeded': json['succeeded'] == null ? undefined : (json['succeeded'].map(BulkGrantSuccess_1.BulkGrantSuccessFromJSON)),
40
+ 'failed': json['failed'] == null ? undefined : (json['failed'].map(BulkGrantItemFailure_1.BulkGrantItemFailureFromJSON)),
41
+ };
42
+ }
43
+ function BulkGrantResponseToJSON(json) {
44
+ return BulkGrantResponseToJSONTyped(json, false);
45
+ }
46
+ function BulkGrantResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'succeeded': value['succeeded'] == null ? undefined : (value['succeeded'].map(BulkGrantSuccess_1.BulkGrantSuccessToJSON)),
52
+ 'failed': value['failed'] == null ? undefined : (value['failed'].map(BulkGrantItemFailure_1.BulkGrantItemFailureToJSON)),
53
+ };
54
+ }
@@ -0,0 +1,72 @@
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 { PermissionCapability } from './PermissionCapability';
13
+ /**
14
+ * A grant that was created, keyed on its (user, object) pair plus new id.
15
+ * @export
16
+ * @interface BulkGrantSuccess
17
+ */
18
+ export interface BulkGrantSuccess {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof BulkGrantSuccess
23
+ */
24
+ userId: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof BulkGrantSuccess
29
+ */
30
+ objectId: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof BulkGrantSuccess
35
+ */
36
+ permissionId: string;
37
+ /**
38
+ *
39
+ * @type {PermissionCapability}
40
+ * @memberof BulkGrantSuccess
41
+ */
42
+ capability: PermissionCapability;
43
+ /**
44
+ *
45
+ * @type {boolean}
46
+ * @memberof BulkGrantSuccess
47
+ */
48
+ canApprove: boolean;
49
+ }
50
+ export declare const BulkGrantSuccessPropertyValidationAttributesMap: {
51
+ [property: string]: {
52
+ maxLength?: number;
53
+ minLength?: number;
54
+ pattern?: string;
55
+ maximum?: number;
56
+ exclusiveMaximum?: boolean;
57
+ minimum?: number;
58
+ exclusiveMinimum?: boolean;
59
+ multipleOf?: number;
60
+ maxItems?: number;
61
+ minItems?: number;
62
+ uniqueItems?: boolean;
63
+ };
64
+ };
65
+ /**
66
+ * Check if a given object implements the BulkGrantSuccess interface.
67
+ */
68
+ export declare function instanceOfBulkGrantSuccess(value: object): value is BulkGrantSuccess;
69
+ export declare function BulkGrantSuccessFromJSON(json: any): BulkGrantSuccess;
70
+ export declare function BulkGrantSuccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantSuccess;
71
+ export declare function BulkGrantSuccessToJSON(json: any): BulkGrantSuccess;
72
+ export declare function BulkGrantSuccessToJSONTyped(value?: BulkGrantSuccess | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,69 @@
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.BulkGrantSuccessPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkGrantSuccess = instanceOfBulkGrantSuccess;
18
+ exports.BulkGrantSuccessFromJSON = BulkGrantSuccessFromJSON;
19
+ exports.BulkGrantSuccessFromJSONTyped = BulkGrantSuccessFromJSONTyped;
20
+ exports.BulkGrantSuccessToJSON = BulkGrantSuccessToJSON;
21
+ exports.BulkGrantSuccessToJSONTyped = BulkGrantSuccessToJSONTyped;
22
+ const PermissionCapability_1 = require("./PermissionCapability");
23
+ exports.BulkGrantSuccessPropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the BulkGrantSuccess interface.
26
+ */
27
+ function instanceOfBulkGrantSuccess(value) {
28
+ if (!('userId' in value) || value['userId'] === undefined)
29
+ return false;
30
+ if (!('objectId' in value) || value['objectId'] === undefined)
31
+ return false;
32
+ if (!('permissionId' in value) || value['permissionId'] === undefined)
33
+ return false;
34
+ if (!('capability' in value) || value['capability'] === undefined)
35
+ return false;
36
+ if (!('canApprove' in value) || value['canApprove'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function BulkGrantSuccessFromJSON(json) {
41
+ return BulkGrantSuccessFromJSONTyped(json, false);
42
+ }
43
+ function BulkGrantSuccessFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'userId': json['user_id'],
49
+ 'objectId': json['object_id'],
50
+ 'permissionId': json['permission_id'],
51
+ 'capability': (0, PermissionCapability_1.PermissionCapabilityFromJSON)(json['capability']),
52
+ 'canApprove': json['can_approve'],
53
+ };
54
+ }
55
+ function BulkGrantSuccessToJSON(json) {
56
+ return BulkGrantSuccessToJSONTyped(json, false);
57
+ }
58
+ function BulkGrantSuccessToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'user_id': value['userId'],
64
+ 'object_id': value['objectId'],
65
+ 'permission_id': value['permissionId'],
66
+ 'capability': (0, PermissionCapability_1.PermissionCapabilityToJSON)(value['capability']),
67
+ 'can_approve': value['canApprove'],
68
+ };
69
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { BulkFailureReason } from './BulkFailureReason';
13
+ /**
14
+ * A single id that could not be applied, and why.
15
+ * @export
16
+ * @interface BulkItemFailure
17
+ */
18
+ export interface BulkItemFailure {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof BulkItemFailure
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {BulkFailureReason}
28
+ * @memberof BulkItemFailure
29
+ */
30
+ reason: BulkFailureReason;
31
+ }
32
+ export declare const BulkItemFailurePropertyValidationAttributesMap: {
33
+ [property: string]: {
34
+ maxLength?: number;
35
+ minLength?: number;
36
+ pattern?: string;
37
+ maximum?: number;
38
+ exclusiveMaximum?: boolean;
39
+ minimum?: number;
40
+ exclusiveMinimum?: boolean;
41
+ multipleOf?: number;
42
+ maxItems?: number;
43
+ minItems?: number;
44
+ uniqueItems?: boolean;
45
+ };
46
+ };
47
+ /**
48
+ * Check if a given object implements the BulkItemFailure interface.
49
+ */
50
+ export declare function instanceOfBulkItemFailure(value: object): value is BulkItemFailure;
51
+ export declare function BulkItemFailureFromJSON(json: any): BulkItemFailure;
52
+ export declare function BulkItemFailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkItemFailure;
53
+ export declare function BulkItemFailureToJSON(json: any): BulkItemFailure;
54
+ export declare function BulkItemFailureToJSONTyped(value?: BulkItemFailure | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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.BulkItemFailurePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkItemFailure = instanceOfBulkItemFailure;
18
+ exports.BulkItemFailureFromJSON = BulkItemFailureFromJSON;
19
+ exports.BulkItemFailureFromJSONTyped = BulkItemFailureFromJSONTyped;
20
+ exports.BulkItemFailureToJSON = BulkItemFailureToJSON;
21
+ exports.BulkItemFailureToJSONTyped = BulkItemFailureToJSONTyped;
22
+ const BulkFailureReason_1 = require("./BulkFailureReason");
23
+ exports.BulkItemFailurePropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the BulkItemFailure interface.
26
+ */
27
+ function instanceOfBulkItemFailure(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('reason' in value) || value['reason'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ function BulkItemFailureFromJSON(json) {
35
+ return BulkItemFailureFromJSONTyped(json, false);
36
+ }
37
+ function BulkItemFailureFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'id': json['id'],
43
+ 'reason': (0, BulkFailureReason_1.BulkFailureReasonFromJSON)(json['reason']),
44
+ };
45
+ }
46
+ function BulkItemFailureToJSON(json) {
47
+ return BulkItemFailureToJSONTyped(json, false);
48
+ }
49
+ function BulkItemFailureToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'id': value['id'],
55
+ 'reason': (0, BulkFailureReason_1.BulkFailureReasonToJSON)(value['reason']),
56
+ };
57
+ }
@@ -0,0 +1,59 @@
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
+ * Move the selected folders and documents into ``target_folder_id``.
14
+ * @export
15
+ * @interface BulkMoveRequest
16
+ */
17
+ export interface BulkMoveRequest {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof BulkMoveRequest
22
+ */
23
+ folderIds?: Array<string>;
24
+ /**
25
+ *
26
+ * @type {Array<string>}
27
+ * @memberof BulkMoveRequest
28
+ */
29
+ documentIds?: Array<string>;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof BulkMoveRequest
34
+ */
35
+ targetFolderId: string;
36
+ }
37
+ export declare const BulkMoveRequestPropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number;
40
+ minLength?: number;
41
+ pattern?: string;
42
+ maximum?: number;
43
+ exclusiveMaximum?: boolean;
44
+ minimum?: number;
45
+ exclusiveMinimum?: boolean;
46
+ multipleOf?: number;
47
+ maxItems?: number;
48
+ minItems?: number;
49
+ uniqueItems?: boolean;
50
+ };
51
+ };
52
+ /**
53
+ * Check if a given object implements the BulkMoveRequest interface.
54
+ */
55
+ export declare function instanceOfBulkMoveRequest(value: object): value is BulkMoveRequest;
56
+ export declare function BulkMoveRequestFromJSON(json: any): BulkMoveRequest;
57
+ export declare function BulkMoveRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkMoveRequest;
58
+ export declare function BulkMoveRequestToJSON(json: any): BulkMoveRequest;
59
+ export declare function BulkMoveRequestToJSONTyped(value?: BulkMoveRequest | 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.BulkMoveRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfBulkMoveRequest = instanceOfBulkMoveRequest;
18
+ exports.BulkMoveRequestFromJSON = BulkMoveRequestFromJSON;
19
+ exports.BulkMoveRequestFromJSONTyped = BulkMoveRequestFromJSONTyped;
20
+ exports.BulkMoveRequestToJSON = BulkMoveRequestToJSON;
21
+ exports.BulkMoveRequestToJSONTyped = BulkMoveRequestToJSONTyped;
22
+ exports.BulkMoveRequestPropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the BulkMoveRequest interface.
25
+ */
26
+ function instanceOfBulkMoveRequest(value) {
27
+ if (!('targetFolderId' in value) || value['targetFolderId'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function BulkMoveRequestFromJSON(json) {
32
+ return BulkMoveRequestFromJSONTyped(json, false);
33
+ }
34
+ function BulkMoveRequestFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'folderIds': json['folder_ids'] == null ? undefined : json['folder_ids'],
40
+ 'documentIds': json['document_ids'] == null ? undefined : json['document_ids'],
41
+ 'targetFolderId': json['target_folder_id'],
42
+ };
43
+ }
44
+ function BulkMoveRequestToJSON(json) {
45
+ return BulkMoveRequestToJSONTyped(json, false);
46
+ }
47
+ function BulkMoveRequestToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'folder_ids': value['folderIds'],
53
+ 'document_ids': value['documentIds'],
54
+ 'target_folder_id': value['targetFolderId'],
55
+ };
56
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { BulkItemFailure } from './BulkItemFailure';
13
+ /**
14
+ * Per-item outcome of a bulk operation keyed on a single PDO id.
15
+ * @export
16
+ * @interface BulkOperationResponse
17
+ */
18
+ export interface BulkOperationResponse {
19
+ /**
20
+ *
21
+ * @type {Array<string>}
22
+ * @memberof BulkOperationResponse
23
+ */
24
+ succeeded?: Array<string>;
25
+ /**
26
+ *
27
+ * @type {Array<BulkItemFailure>}
28
+ * @memberof BulkOperationResponse
29
+ */
30
+ failed?: Array<BulkItemFailure>;
31
+ }
32
+ export declare const BulkOperationResponsePropertyValidationAttributesMap: {
33
+ [property: string]: {
34
+ maxLength?: number;
35
+ minLength?: number;
36
+ pattern?: string;
37
+ maximum?: number;
38
+ exclusiveMaximum?: boolean;
39
+ minimum?: number;
40
+ exclusiveMinimum?: boolean;
41
+ multipleOf?: number;
42
+ maxItems?: number;
43
+ minItems?: number;
44
+ uniqueItems?: boolean;
45
+ };
46
+ };
47
+ /**
48
+ * Check if a given object implements the BulkOperationResponse interface.
49
+ */
50
+ export declare function instanceOfBulkOperationResponse(value: object): value is BulkOperationResponse;
51
+ export declare function BulkOperationResponseFromJSON(json: any): BulkOperationResponse;
52
+ export declare function BulkOperationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkOperationResponse;
53
+ export declare function BulkOperationResponseToJSON(json: any): BulkOperationResponse;
54
+ export declare function BulkOperationResponseToJSONTyped(value?: BulkOperationResponse | null, ignoreDiscriminator?: boolean): any;