@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.
- package/.openapi-generator/FILES +28 -0
- package/README.md +20 -2
- package/dist/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/apis/BulkDeleteApi.js +115 -0
- package/dist/apis/BulkMoveApi.d.ts +64 -0
- package/dist/apis/BulkMoveApi.js +115 -0
- package/dist/apis/TrashApi.d.ts +77 -1
- package/dist/apis/TrashApi.js +98 -0
- package/dist/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/apis/UserPermissionsApi.js +98 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/esm/apis/BulkDeleteApi.js +78 -0
- package/dist/esm/apis/BulkMoveApi.d.ts +64 -0
- package/dist/esm/apis/BulkMoveApi.js +78 -0
- package/dist/esm/apis/TrashApi.d.ts +77 -1
- package/dist/esm/apis/TrashApi.js +99 -1
- package/dist/esm/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/esm/apis/UserPermissionsApi.js +99 -1
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/esm/models/BulkDeleteRequest.js +44 -0
- package/dist/esm/models/BulkFailureReason.d.ts +37 -0
- package/dist/esm/models/BulkFailureReason.js +55 -0
- package/dist/esm/models/BulkGrantItem.d.ts +66 -0
- package/dist/esm/models/BulkGrantItem.js +55 -0
- package/dist/esm/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/esm/models/BulkGrantItemFailure.js +53 -0
- package/dist/esm/models/BulkGrantRequest.d.ts +54 -0
- package/dist/esm/models/BulkGrantRequest.js +47 -0
- package/dist/esm/models/BulkGrantResponse.d.ts +55 -0
- package/dist/esm/models/BulkGrantResponse.js +46 -0
- package/dist/esm/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/esm/models/BulkGrantSuccess.js +61 -0
- package/dist/esm/models/BulkItemFailure.d.ts +54 -0
- package/dist/esm/models/BulkItemFailure.js +49 -0
- package/dist/esm/models/BulkMoveRequest.d.ts +59 -0
- package/dist/esm/models/BulkMoveRequest.js +48 -0
- package/dist/esm/models/BulkOperationResponse.d.ts +54 -0
- package/dist/esm/models/BulkOperationResponse.js +45 -0
- package/dist/esm/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/esm/models/BulkRevokeRequest.js +46 -0
- package/dist/esm/models/BulkTrashRequest.d.ts +47 -0
- package/dist/esm/models/BulkTrashRequest.js +42 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +6 -0
- package/dist/esm/models/CreateUploadRequest.js +2 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadata.js +6 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/esm/models/ErrorResponse.d.ts +1 -0
- package/dist/esm/models/ErrorResponse.js +1 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/models/BulkDeleteRequest.js +52 -0
- package/dist/models/BulkFailureReason.d.ts +37 -0
- package/dist/models/BulkFailureReason.js +63 -0
- package/dist/models/BulkGrantItem.d.ts +66 -0
- package/dist/models/BulkGrantItem.js +63 -0
- package/dist/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/models/BulkGrantItemFailure.js +61 -0
- package/dist/models/BulkGrantRequest.d.ts +54 -0
- package/dist/models/BulkGrantRequest.js +55 -0
- package/dist/models/BulkGrantResponse.d.ts +55 -0
- package/dist/models/BulkGrantResponse.js +54 -0
- package/dist/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/models/BulkGrantSuccess.js +69 -0
- package/dist/models/BulkItemFailure.d.ts +54 -0
- package/dist/models/BulkItemFailure.js +57 -0
- package/dist/models/BulkMoveRequest.d.ts +59 -0
- package/dist/models/BulkMoveRequest.js +56 -0
- package/dist/models/BulkOperationResponse.d.ts +54 -0
- package/dist/models/BulkOperationResponse.js +53 -0
- package/dist/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/models/BulkRevokeRequest.js +54 -0
- package/dist/models/BulkTrashRequest.d.ts +47 -0
- package/dist/models/BulkTrashRequest.js +50 -0
- package/dist/models/CreateUploadRequest.d.ts +6 -0
- package/dist/models/CreateUploadRequest.js +2 -0
- package/dist/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/models/DocumentVersionMetadata.js +6 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/models/ErrorResponse.d.ts +1 -0
- package/dist/models/ErrorResponse.js +1 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/BulkDeleteApi.md +84 -0
- package/docs/BulkDeleteRequest.md +37 -0
- package/docs/BulkFailureReason.md +33 -0
- package/docs/BulkGrantItem.md +41 -0
- package/docs/BulkGrantItemFailure.md +39 -0
- package/docs/BulkGrantRequest.md +37 -0
- package/docs/BulkGrantResponse.md +37 -0
- package/docs/BulkGrantSuccess.md +43 -0
- package/docs/BulkItemFailure.md +37 -0
- package/docs/BulkMoveApi.md +84 -0
- package/docs/BulkMoveRequest.md +39 -0
- package/docs/BulkOperationResponse.md +37 -0
- package/docs/BulkRevokeRequest.md +37 -0
- package/docs/BulkTrashRequest.md +35 -0
- package/docs/CreateUploadRequest.md +2 -0
- package/docs/DocumentVersionMetadata.md +6 -0
- package/docs/DocumentVersionMetadataUpdate.md +6 -0
- package/docs/TrashApi.md +152 -0
- package/docs/UserPermissionsApi.md +152 -0
- package/package.json +1 -1
- package/src/apis/BulkDeleteApi.ts +133 -0
- package/src/apis/BulkMoveApi.ts +133 -0
- package/src/apis/TrashApi.ts +176 -0
- package/src/apis/UserPermissionsApi.ts +182 -0
- package/src/apis/index.ts +2 -0
- package/src/models/BulkDeleteRequest.ts +90 -0
- package/src/models/BulkFailureReason.ts +65 -0
- package/src/models/BulkGrantItem.ts +119 -0
- package/src/models/BulkGrantItemFailure.ts +111 -0
- package/src/models/BulkGrantRequest.ts +99 -0
- package/src/models/BulkGrantResponse.ts +105 -0
- package/src/models/BulkGrantSuccess.ts +129 -0
- package/src/models/BulkItemFailure.ts +102 -0
- package/src/models/BulkMoveRequest.ts +99 -0
- package/src/models/BulkOperationResponse.ts +98 -0
- package/src/models/BulkRevokeRequest.ts +91 -0
- package/src/models/BulkTrashRequest.ts +82 -0
- package/src/models/CreateUploadRequest.ts +8 -0
- package/src/models/DocumentVersionMetadata.ts +24 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +24 -0
- package/src/models/ErrorResponse.ts +1 -0
- package/src/models/index.ts +12 -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 { PermissionCapability } from './PermissionCapability';
|
|
13
|
+
/**
|
|
14
|
+
* One requested grant: a capability on an object (PDO id) for a user.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BulkGrantItem
|
|
17
|
+
*/
|
|
18
|
+
export interface BulkGrantItem {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof BulkGrantItem
|
|
23
|
+
*/
|
|
24
|
+
userId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof BulkGrantItem
|
|
29
|
+
*/
|
|
30
|
+
objectId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {PermissionCapability}
|
|
34
|
+
* @memberof BulkGrantItem
|
|
35
|
+
*/
|
|
36
|
+
capability: PermissionCapability;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof BulkGrantItem
|
|
41
|
+
*/
|
|
42
|
+
canApprove?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare const BulkGrantItemPropertyValidationAttributesMap: {
|
|
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 BulkGrantItem interface.
|
|
61
|
+
*/
|
|
62
|
+
export declare function instanceOfBulkGrantItem(value: object): value is BulkGrantItem;
|
|
63
|
+
export declare function BulkGrantItemFromJSON(json: any): BulkGrantItem;
|
|
64
|
+
export declare function BulkGrantItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantItem;
|
|
65
|
+
export declare function BulkGrantItemToJSON(json: any): BulkGrantItem;
|
|
66
|
+
export declare function BulkGrantItemToJSONTyped(value?: BulkGrantItem | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { PermissionCapabilityFromJSON, PermissionCapabilityToJSON, } from './PermissionCapability';
|
|
15
|
+
export const BulkGrantItemPropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the BulkGrantItem interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfBulkGrantItem(value) {
|
|
20
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('objectId' in value) || value['objectId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('capability' in value) || value['capability'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function BulkGrantItemFromJSON(json) {
|
|
29
|
+
return BulkGrantItemFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function BulkGrantItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'userId': json['user_id'],
|
|
37
|
+
'objectId': json['object_id'],
|
|
38
|
+
'capability': PermissionCapabilityFromJSON(json['capability']),
|
|
39
|
+
'canApprove': json['can_approve'] == null ? undefined : json['can_approve'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function BulkGrantItemToJSON(json) {
|
|
43
|
+
return BulkGrantItemToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function BulkGrantItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'user_id': value['userId'],
|
|
51
|
+
'object_id': value['objectId'],
|
|
52
|
+
'capability': PermissionCapabilityToJSON(value['capability']),
|
|
53
|
+
'can_approve': value['canApprove'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -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 { BulkFailureReason } from './BulkFailureReason';
|
|
13
|
+
/**
|
|
14
|
+
* A grant that could not be created, keyed on its (user, object) pair.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BulkGrantItemFailure
|
|
17
|
+
*/
|
|
18
|
+
export interface BulkGrantItemFailure {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof BulkGrantItemFailure
|
|
23
|
+
*/
|
|
24
|
+
userId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof BulkGrantItemFailure
|
|
29
|
+
*/
|
|
30
|
+
objectId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {BulkFailureReason}
|
|
34
|
+
* @memberof BulkGrantItemFailure
|
|
35
|
+
*/
|
|
36
|
+
reason: BulkFailureReason;
|
|
37
|
+
}
|
|
38
|
+
export declare const BulkGrantItemFailurePropertyValidationAttributesMap: {
|
|
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 BulkGrantItemFailure interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfBulkGrantItemFailure(value: object): value is BulkGrantItemFailure;
|
|
57
|
+
export declare function BulkGrantItemFailureFromJSON(json: any): BulkGrantItemFailure;
|
|
58
|
+
export declare function BulkGrantItemFailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantItemFailure;
|
|
59
|
+
export declare function BulkGrantItemFailureToJSON(json: any): BulkGrantItemFailure;
|
|
60
|
+
export declare function BulkGrantItemFailureToJSONTyped(value?: BulkGrantItemFailure | 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 { BulkFailureReasonFromJSON, BulkFailureReasonToJSON, } from './BulkFailureReason';
|
|
15
|
+
export const BulkGrantItemFailurePropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the BulkGrantItemFailure interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfBulkGrantItemFailure(value) {
|
|
20
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('objectId' in value) || value['objectId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('reason' in value) || value['reason'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function BulkGrantItemFailureFromJSON(json) {
|
|
29
|
+
return BulkGrantItemFailureFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function BulkGrantItemFailureFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'userId': json['user_id'],
|
|
37
|
+
'objectId': json['object_id'],
|
|
38
|
+
'reason': BulkFailureReasonFromJSON(json['reason']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function BulkGrantItemFailureToJSON(json) {
|
|
42
|
+
return BulkGrantItemFailureToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function BulkGrantItemFailureToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'user_id': value['userId'],
|
|
50
|
+
'object_id': value['objectId'],
|
|
51
|
+
'reason': BulkFailureReasonToJSON(value['reason']),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -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 { BulkGrantItem } from './BulkGrantItem';
|
|
13
|
+
/**
|
|
14
|
+
* Grant many (user, object, capability) permissions in one request.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface BulkGrantRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface BulkGrantRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof BulkGrantRequest
|
|
23
|
+
*/
|
|
24
|
+
tenantId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<BulkGrantItem>}
|
|
28
|
+
* @memberof BulkGrantRequest
|
|
29
|
+
*/
|
|
30
|
+
grants?: Array<BulkGrantItem>;
|
|
31
|
+
}
|
|
32
|
+
export declare const BulkGrantRequestPropertyValidationAttributesMap: {
|
|
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 BulkGrantRequest interface.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instanceOfBulkGrantRequest(value: object): value is BulkGrantRequest;
|
|
51
|
+
export declare function BulkGrantRequestFromJSON(json: any): BulkGrantRequest;
|
|
52
|
+
export declare function BulkGrantRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantRequest;
|
|
53
|
+
export declare function BulkGrantRequestToJSON(json: any): BulkGrantRequest;
|
|
54
|
+
export declare function BulkGrantRequestToJSONTyped(value?: BulkGrantRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { BulkGrantItemFromJSON, BulkGrantItemToJSON, } from './BulkGrantItem';
|
|
15
|
+
export const BulkGrantRequestPropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the BulkGrantRequest interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfBulkGrantRequest(value) {
|
|
20
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function BulkGrantRequestFromJSON(json) {
|
|
25
|
+
return BulkGrantRequestFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function BulkGrantRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'tenantId': json['tenant_id'],
|
|
33
|
+
'grants': json['grants'] == null ? undefined : (json['grants'].map(BulkGrantItemFromJSON)),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function BulkGrantRequestToJSON(json) {
|
|
37
|
+
return BulkGrantRequestToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function BulkGrantRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'tenant_id': value['tenantId'],
|
|
45
|
+
'grants': value['grants'] == null ? undefined : (value['grants'].map(BulkGrantItemToJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -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,46 @@
|
|
|
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 { BulkGrantItemFailureFromJSON, BulkGrantItemFailureToJSON, } from './BulkGrantItemFailure';
|
|
15
|
+
import { BulkGrantSuccessFromJSON, BulkGrantSuccessToJSON, } from './BulkGrantSuccess';
|
|
16
|
+
export const BulkGrantResponsePropertyValidationAttributesMap = {};
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the BulkGrantResponse interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfBulkGrantResponse(value) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function BulkGrantResponseFromJSON(json) {
|
|
24
|
+
return BulkGrantResponseFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function BulkGrantResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'succeeded': json['succeeded'] == null ? undefined : (json['succeeded'].map(BulkGrantSuccessFromJSON)),
|
|
32
|
+
'failed': json['failed'] == null ? undefined : (json['failed'].map(BulkGrantItemFailureFromJSON)),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function BulkGrantResponseToJSON(json) {
|
|
36
|
+
return BulkGrantResponseToJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
export function BulkGrantResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'succeeded': value['succeeded'] == null ? undefined : (value['succeeded'].map(BulkGrantSuccessToJSON)),
|
|
44
|
+
'failed': value['failed'] == null ? undefined : (value['failed'].map(BulkGrantItemFailureToJSON)),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -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,61 @@
|
|
|
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 { PermissionCapabilityFromJSON, PermissionCapabilityToJSON, } from './PermissionCapability';
|
|
15
|
+
export const BulkGrantSuccessPropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the BulkGrantSuccess interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfBulkGrantSuccess(value) {
|
|
20
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('objectId' in value) || value['objectId'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('permissionId' in value) || value['permissionId'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('capability' in value) || value['capability'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('canApprove' in value) || value['canApprove'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function BulkGrantSuccessFromJSON(json) {
|
|
33
|
+
return BulkGrantSuccessFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function BulkGrantSuccessFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'userId': json['user_id'],
|
|
41
|
+
'objectId': json['object_id'],
|
|
42
|
+
'permissionId': json['permission_id'],
|
|
43
|
+
'capability': PermissionCapabilityFromJSON(json['capability']),
|
|
44
|
+
'canApprove': json['can_approve'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function BulkGrantSuccessToJSON(json) {
|
|
48
|
+
return BulkGrantSuccessToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function BulkGrantSuccessToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'user_id': value['userId'],
|
|
56
|
+
'object_id': value['objectId'],
|
|
57
|
+
'permission_id': value['permissionId'],
|
|
58
|
+
'capability': PermissionCapabilityToJSON(value['capability']),
|
|
59
|
+
'can_approve': value['canApprove'],
|
|
60
|
+
};
|
|
61
|
+
}
|