@knowledge-stack/ksapi 1.153.0 → 1.155.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/DocumentsApi.d.ts +6 -6
- package/dist/apis/DocumentsApi.js +6 -6
- 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/DocumentsApi.d.ts +6 -6
- package/dist/esm/apis/DocumentsApi.js +6 -6
- 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/DocumentsApi.md +7 -7
- 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/DocumentsApi.ts +14 -14
- 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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Restore or permanently delete the selected trashed objects by PDO id.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BulkTrashRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface BulkTrashRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof BulkTrashRequest
|
|
22
|
+
*/
|
|
23
|
+
objectIds?: Array<string>;
|
|
24
|
+
}
|
|
25
|
+
export declare const BulkTrashRequestPropertyValidationAttributesMap: {
|
|
26
|
+
[property: string]: {
|
|
27
|
+
maxLength?: number;
|
|
28
|
+
minLength?: number;
|
|
29
|
+
pattern?: string;
|
|
30
|
+
maximum?: number;
|
|
31
|
+
exclusiveMaximum?: boolean;
|
|
32
|
+
minimum?: number;
|
|
33
|
+
exclusiveMinimum?: boolean;
|
|
34
|
+
multipleOf?: number;
|
|
35
|
+
maxItems?: number;
|
|
36
|
+
minItems?: number;
|
|
37
|
+
uniqueItems?: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the BulkTrashRequest interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfBulkTrashRequest(value: object): value is BulkTrashRequest;
|
|
44
|
+
export declare function BulkTrashRequestFromJSON(json: any): BulkTrashRequest;
|
|
45
|
+
export declare function BulkTrashRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkTrashRequest;
|
|
46
|
+
export declare function BulkTrashRequestToJSON(json: any): BulkTrashRequest;
|
|
47
|
+
export declare function BulkTrashRequestToJSONTyped(value?: BulkTrashRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export const BulkTrashRequestPropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the BulkTrashRequest interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfBulkTrashRequest(value) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
export function BulkTrashRequestFromJSON(json) {
|
|
22
|
+
return BulkTrashRequestFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function BulkTrashRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if (json == null) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
'objectIds': json['object_ids'] == null ? undefined : json['object_ids'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function BulkTrashRequestToJSON(json) {
|
|
33
|
+
return BulkTrashRequestToJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function BulkTrashRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
36
|
+
if (value == null) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'object_ids': value['objectIds'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -39,6 +39,12 @@ export interface CreateUploadRequest {
|
|
|
39
39
|
* @memberof CreateUploadRequest
|
|
40
40
|
*/
|
|
41
41
|
sizeBytes: number;
|
|
42
|
+
/**
|
|
43
|
+
* Tags applied to the document on completion (mirrors the buffered ingest endpoints so a mixed submit tags recordings too)
|
|
44
|
+
* @type {Array<string>}
|
|
45
|
+
* @memberof CreateUploadRequest
|
|
46
|
+
*/
|
|
47
|
+
tagIds?: Array<string>;
|
|
42
48
|
}
|
|
43
49
|
export declare const CreateUploadRequestPropertyValidationAttributesMap: {
|
|
44
50
|
[property: string]: {
|
|
@@ -38,6 +38,7 @@ export function CreateUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
'name': json['name'],
|
|
39
39
|
'filename': json['filename'],
|
|
40
40
|
'sizeBytes': json['size_bytes'],
|
|
41
|
+
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
export function CreateUploadRequestToJSON(json) {
|
|
@@ -52,5 +53,6 @@ export function CreateUploadRequestToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
52
53
|
'name': value['name'],
|
|
53
54
|
'filename': value['filename'],
|
|
54
55
|
'size_bytes': value['sizeBytes'],
|
|
56
|
+
'tag_ids': value['tagIds'],
|
|
55
57
|
};
|
|
56
58
|
}
|
|
@@ -87,6 +87,24 @@ export interface DocumentVersionMetadata {
|
|
|
87
87
|
* @memberof DocumentVersionMetadata
|
|
88
88
|
*/
|
|
89
89
|
totalChunks?: number | null;
|
|
90
|
+
/**
|
|
91
|
+
* Media (audio/video) duration in milliseconds; null for non-media
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof DocumentVersionMetadata
|
|
94
|
+
*/
|
|
95
|
+
durationMs?: number | null;
|
|
96
|
+
/**
|
|
97
|
+
* ASR-detected language of the media transcript, as returned by the ASR provider; null for non-media or when the provider omits it
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof DocumentVersionMetadata
|
|
100
|
+
*/
|
|
101
|
+
language?: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Number of transcript segments produced by ASR; null for non-media
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof DocumentVersionMetadata
|
|
106
|
+
*/
|
|
107
|
+
segmentCount?: number | null;
|
|
90
108
|
/**
|
|
91
109
|
* Total formula cells in the workbook (XLSX only)
|
|
92
110
|
* @type {number}
|
|
@@ -39,6 +39,9 @@ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
39
39
|
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
40
40
|
'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
|
|
41
41
|
'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
|
|
42
|
+
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
43
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
44
|
+
'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
|
|
42
45
|
'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
|
|
43
46
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
44
47
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
@@ -70,6 +73,9 @@ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator =
|
|
|
70
73
|
'total_pages': value['totalPages'],
|
|
71
74
|
'total_sections': value['totalSections'],
|
|
72
75
|
'total_chunks': value['totalChunks'],
|
|
76
|
+
'duration_ms': value['durationMs'],
|
|
77
|
+
'language': value['language'],
|
|
78
|
+
'segment_count': value['segmentCount'],
|
|
73
79
|
'total_formulas': value['totalFormulas'],
|
|
74
80
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
75
81
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
@@ -99,6 +99,24 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
99
99
|
* @memberof DocumentVersionMetadataUpdate
|
|
100
100
|
*/
|
|
101
101
|
totalChunks?: number | null;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
106
|
+
*/
|
|
107
|
+
durationMs?: number | null;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
112
|
+
*/
|
|
113
|
+
language?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @memberof DocumentVersionMetadataUpdate
|
|
118
|
+
*/
|
|
119
|
+
segmentCount?: number | null;
|
|
102
120
|
/**
|
|
103
121
|
*
|
|
104
122
|
* @type {number}
|
|
@@ -42,6 +42,9 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscrimin
|
|
|
42
42
|
'totalPages': json['total_pages'] == null ? undefined : json['total_pages'],
|
|
43
43
|
'totalSections': json['total_sections'] == null ? undefined : json['total_sections'],
|
|
44
44
|
'totalChunks': json['total_chunks'] == null ? undefined : json['total_chunks'],
|
|
45
|
+
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
46
|
+
'language': json['language'] == null ? undefined : json['language'],
|
|
47
|
+
'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
|
|
45
48
|
'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
|
|
46
49
|
'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
|
|
47
50
|
'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
|
|
@@ -75,6 +78,9 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscrimina
|
|
|
75
78
|
'total_pages': value['totalPages'],
|
|
76
79
|
'total_sections': value['totalSections'],
|
|
77
80
|
'total_chunks': value['totalChunks'],
|
|
81
|
+
'duration_ms': value['durationMs'],
|
|
82
|
+
'language': value['language'],
|
|
83
|
+
'segment_count': value['segmentCount'],
|
|
78
84
|
'total_formulas': value['totalFormulas'],
|
|
79
85
|
'xlsx_parse_result_s3': value['xlsxParseResultS3'],
|
|
80
86
|
'xlsx_named_ranges': value['xlsxNamedRanges'],
|
|
@@ -40,6 +40,7 @@ export interface ErrorResponse {
|
|
|
40
40
|
export declare const ErrorResponseCodeEnum: {
|
|
41
41
|
readonly Error: 'error';
|
|
42
42
|
readonly BadRequest: 'bad_request';
|
|
43
|
+
readonly PermissionLimit: 'permission_limit';
|
|
43
44
|
readonly Unauthorized: 'unauthorized';
|
|
44
45
|
readonly Forbidden: 'forbidden';
|
|
45
46
|
readonly NotFound: 'not_found';
|
|
@@ -17,10 +17,22 @@ export * from './AskResponse';
|
|
|
17
17
|
export * from './BlockChangeType';
|
|
18
18
|
export * from './BlockKind';
|
|
19
19
|
export * from './BrandingLogoType';
|
|
20
|
+
export * from './BulkDeleteRequest';
|
|
20
21
|
export * from './BulkDownloadRequest';
|
|
22
|
+
export * from './BulkFailureReason';
|
|
23
|
+
export * from './BulkGrantItem';
|
|
24
|
+
export * from './BulkGrantItemFailure';
|
|
25
|
+
export * from './BulkGrantRequest';
|
|
26
|
+
export * from './BulkGrantResponse';
|
|
27
|
+
export * from './BulkGrantSuccess';
|
|
28
|
+
export * from './BulkItemFailure';
|
|
21
29
|
export * from './BulkModelTablesRequest';
|
|
22
30
|
export * from './BulkModelTablesResponse';
|
|
31
|
+
export * from './BulkMoveRequest';
|
|
32
|
+
export * from './BulkOperationResponse';
|
|
33
|
+
export * from './BulkRevokeRequest';
|
|
23
34
|
export * from './BulkTagRequest';
|
|
35
|
+
export * from './BulkTrashRequest';
|
|
24
36
|
export * from './CatalogColumnResponse';
|
|
25
37
|
export * from './CatalogTableResponse';
|
|
26
38
|
export * from './CellChange';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -19,10 +19,22 @@ export * from './AskResponse';
|
|
|
19
19
|
export * from './BlockChangeType';
|
|
20
20
|
export * from './BlockKind';
|
|
21
21
|
export * from './BrandingLogoType';
|
|
22
|
+
export * from './BulkDeleteRequest';
|
|
22
23
|
export * from './BulkDownloadRequest';
|
|
24
|
+
export * from './BulkFailureReason';
|
|
25
|
+
export * from './BulkGrantItem';
|
|
26
|
+
export * from './BulkGrantItemFailure';
|
|
27
|
+
export * from './BulkGrantRequest';
|
|
28
|
+
export * from './BulkGrantResponse';
|
|
29
|
+
export * from './BulkGrantSuccess';
|
|
30
|
+
export * from './BulkItemFailure';
|
|
23
31
|
export * from './BulkModelTablesRequest';
|
|
24
32
|
export * from './BulkModelTablesResponse';
|
|
33
|
+
export * from './BulkMoveRequest';
|
|
34
|
+
export * from './BulkOperationResponse';
|
|
35
|
+
export * from './BulkRevokeRequest';
|
|
25
36
|
export * from './BulkTagRequest';
|
|
37
|
+
export * from './BulkTrashRequest';
|
|
26
38
|
export * from './CatalogColumnResponse';
|
|
27
39
|
export * from './CatalogTableResponse';
|
|
28
40
|
export * from './CellChange';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Soft-delete the selected folders and documents to Trash.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BulkDeleteRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface BulkDeleteRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof BulkDeleteRequest
|
|
22
|
+
*/
|
|
23
|
+
folderIds?: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof BulkDeleteRequest
|
|
28
|
+
*/
|
|
29
|
+
documentIds?: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
export declare const BulkDeleteRequestPropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the BulkDeleteRequest interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfBulkDeleteRequest(value: object): value is BulkDeleteRequest;
|
|
50
|
+
export declare function BulkDeleteRequestFromJSON(json: any): BulkDeleteRequest;
|
|
51
|
+
export declare function BulkDeleteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkDeleteRequest;
|
|
52
|
+
export declare function BulkDeleteRequestToJSON(json: any): BulkDeleteRequest;
|
|
53
|
+
export declare function BulkDeleteRequestToJSONTyped(value?: BulkDeleteRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.BulkDeleteRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfBulkDeleteRequest = instanceOfBulkDeleteRequest;
|
|
18
|
+
exports.BulkDeleteRequestFromJSON = BulkDeleteRequestFromJSON;
|
|
19
|
+
exports.BulkDeleteRequestFromJSONTyped = BulkDeleteRequestFromJSONTyped;
|
|
20
|
+
exports.BulkDeleteRequestToJSON = BulkDeleteRequestToJSON;
|
|
21
|
+
exports.BulkDeleteRequestToJSONTyped = BulkDeleteRequestToJSONTyped;
|
|
22
|
+
exports.BulkDeleteRequestPropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the BulkDeleteRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfBulkDeleteRequest(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function BulkDeleteRequestFromJSON(json) {
|
|
30
|
+
return BulkDeleteRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function BulkDeleteRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'folderIds': json['folder_ids'] == null ? undefined : json['folder_ids'],
|
|
38
|
+
'documentIds': json['document_ids'] == null ? undefined : json['document_ids'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function BulkDeleteRequestToJSON(json) {
|
|
42
|
+
return BulkDeleteRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function BulkDeleteRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'folder_ids': value['folderIds'],
|
|
50
|
+
'document_ids': value['documentIds'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* Why a single item in a bulk operation was not applied.
|
|
14
|
+
*
|
|
15
|
+
* Every value is produced by a specific, pre-checked gate — an *unexpected*
|
|
16
|
+
* per-item error is deliberately not caught (it surfaces as a 500) rather than
|
|
17
|
+
* hidden behind a vague catch-all.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const BulkFailureReason: {
|
|
21
|
+
readonly NotFound: 'not_found';
|
|
22
|
+
readonly Forbidden: 'forbidden';
|
|
23
|
+
readonly SystemManaged: 'system_managed';
|
|
24
|
+
readonly Subsumed: 'subsumed';
|
|
25
|
+
readonly Cycle: 'cycle';
|
|
26
|
+
readonly Sealed: 'sealed';
|
|
27
|
+
readonly CheckedOut: 'checked_out';
|
|
28
|
+
readonly NameConflict: 'name_conflict';
|
|
29
|
+
readonly InProgressWorkflow: 'in_progress_workflow';
|
|
30
|
+
readonly PermissionLimit: 'permission_limit';
|
|
31
|
+
};
|
|
32
|
+
export type BulkFailureReason = typeof BulkFailureReason[keyof typeof BulkFailureReason];
|
|
33
|
+
export declare function instanceOfBulkFailureReason(value: any): boolean;
|
|
34
|
+
export declare function BulkFailureReasonFromJSON(json: any): BulkFailureReason;
|
|
35
|
+
export declare function BulkFailureReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkFailureReason;
|
|
36
|
+
export declare function BulkFailureReasonToJSON(value?: BulkFailureReason | null): any;
|
|
37
|
+
export declare function BulkFailureReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): BulkFailureReason;
|
|
@@ -0,0 +1,63 @@
|
|
|
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.BulkFailureReason = void 0;
|
|
17
|
+
exports.instanceOfBulkFailureReason = instanceOfBulkFailureReason;
|
|
18
|
+
exports.BulkFailureReasonFromJSON = BulkFailureReasonFromJSON;
|
|
19
|
+
exports.BulkFailureReasonFromJSONTyped = BulkFailureReasonFromJSONTyped;
|
|
20
|
+
exports.BulkFailureReasonToJSON = BulkFailureReasonToJSON;
|
|
21
|
+
exports.BulkFailureReasonToJSONTyped = BulkFailureReasonToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Why a single item in a bulk operation was not applied.
|
|
24
|
+
*
|
|
25
|
+
* Every value is produced by a specific, pre-checked gate — an *unexpected*
|
|
26
|
+
* per-item error is deliberately not caught (it surfaces as a 500) rather than
|
|
27
|
+
* hidden behind a vague catch-all.
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
exports.BulkFailureReason = {
|
|
31
|
+
NotFound: 'not_found',
|
|
32
|
+
Forbidden: 'forbidden',
|
|
33
|
+
SystemManaged: 'system_managed',
|
|
34
|
+
Subsumed: 'subsumed',
|
|
35
|
+
Cycle: 'cycle',
|
|
36
|
+
Sealed: 'sealed',
|
|
37
|
+
CheckedOut: 'checked_out',
|
|
38
|
+
NameConflict: 'name_conflict',
|
|
39
|
+
InProgressWorkflow: 'in_progress_workflow',
|
|
40
|
+
PermissionLimit: 'permission_limit'
|
|
41
|
+
};
|
|
42
|
+
function instanceOfBulkFailureReason(value) {
|
|
43
|
+
for (const key in exports.BulkFailureReason) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(exports.BulkFailureReason, key)) {
|
|
45
|
+
if (exports.BulkFailureReason[key] === value) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
function BulkFailureReasonFromJSON(json) {
|
|
53
|
+
return BulkFailureReasonFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function BulkFailureReasonFromJSONTyped(json, ignoreDiscriminator) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
function BulkFailureReasonToJSON(value) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
function BulkFailureReasonToJSONTyped(value, ignoreDiscriminator) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
@@ -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,63 @@
|
|
|
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.BulkGrantItemPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfBulkGrantItem = instanceOfBulkGrantItem;
|
|
18
|
+
exports.BulkGrantItemFromJSON = BulkGrantItemFromJSON;
|
|
19
|
+
exports.BulkGrantItemFromJSONTyped = BulkGrantItemFromJSONTyped;
|
|
20
|
+
exports.BulkGrantItemToJSON = BulkGrantItemToJSON;
|
|
21
|
+
exports.BulkGrantItemToJSONTyped = BulkGrantItemToJSONTyped;
|
|
22
|
+
const PermissionCapability_1 = require("./PermissionCapability");
|
|
23
|
+
exports.BulkGrantItemPropertyValidationAttributesMap = {};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the BulkGrantItem interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfBulkGrantItem(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 (!('capability' in value) || value['capability'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function BulkGrantItemFromJSON(json) {
|
|
37
|
+
return BulkGrantItemFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function BulkGrantItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'userId': json['user_id'],
|
|
45
|
+
'objectId': json['object_id'],
|
|
46
|
+
'capability': (0, PermissionCapability_1.PermissionCapabilityFromJSON)(json['capability']),
|
|
47
|
+
'canApprove': json['can_approve'] == null ? undefined : json['can_approve'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function BulkGrantItemToJSON(json) {
|
|
51
|
+
return BulkGrantItemToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function BulkGrantItemToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'user_id': value['userId'],
|
|
59
|
+
'object_id': value['objectId'],
|
|
60
|
+
'capability': (0, PermissionCapability_1.PermissionCapabilityToJSON)(value['capability']),
|
|
61
|
+
'can_approve': value['canApprove'],
|
|
62
|
+
};
|
|
63
|
+
}
|