@knowledge-stack/ksapi 1.145.1 → 1.147.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 +4 -0
- package/README.md +5 -2
- package/dist/apis/DocumentsApi.d.ts +45 -1
- package/dist/apis/DocumentsApi.js +75 -0
- package/dist/esm/apis/DocumentsApi.d.ts +45 -1
- package/dist/esm/apis/DocumentsApi.js +76 -1
- package/dist/esm/models/ChunkContentItem.d.ts +6 -0
- package/dist/esm/models/ChunkContentItem.js +2 -0
- package/dist/esm/models/IngestZipResponse.d.ts +72 -0
- package/dist/esm/models/IngestZipResponse.js +61 -0
- package/dist/esm/models/SectionContentItem.d.ts +12 -0
- package/dist/esm/models/SectionContentItem.js +4 -0
- package/dist/esm/models/ZipFileResult.d.ts +77 -0
- package/dist/esm/models/ZipFileResult.js +54 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/ChunkContentItem.d.ts +6 -0
- package/dist/models/ChunkContentItem.js +2 -0
- package/dist/models/IngestZipResponse.d.ts +72 -0
- package/dist/models/IngestZipResponse.js +69 -0
- package/dist/models/SectionContentItem.d.ts +12 -0
- package/dist/models/SectionContentItem.js +4 -0
- package/dist/models/ZipFileResult.d.ts +77 -0
- package/dist/models/ZipFileResult.js +62 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/docs/ChunkContentItem.md +2 -0
- package/docs/DocumentsApi.md +82 -0
- package/docs/IngestZipResponse.md +43 -0
- package/docs/SectionContentItem.md +4 -0
- package/docs/SectionContentItemOrChunkContentItem.md +4 -0
- package/docs/ZipFileResult.md +45 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +127 -0
- package/src/models/ChunkContentItem.ts +8 -0
- package/src/models/IngestZipResponse.ts +127 -0
- package/src/models/SectionContentItem.ts +16 -0
- package/src/models/ZipFileResult.ts +123 -0
- package/src/models/index.ts +2 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Per-file outcome from a ZIP ingestion batch.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ZipFileResult
|
|
20
|
+
*/
|
|
21
|
+
export interface ZipFileResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ZipFileResult
|
|
26
|
+
*/
|
|
27
|
+
zipPath: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ZipFileResult
|
|
32
|
+
*/
|
|
33
|
+
documentId?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ZipFileResult
|
|
38
|
+
*/
|
|
39
|
+
documentVersionId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ZipFileResult
|
|
44
|
+
*/
|
|
45
|
+
workflowId?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof ZipFileResult
|
|
50
|
+
*/
|
|
51
|
+
skipped?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ZipFileResult
|
|
56
|
+
*/
|
|
57
|
+
error?: string | null;
|
|
58
|
+
}
|
|
59
|
+
export const ZipFileResultPropertyValidationAttributesMap: {
|
|
60
|
+
[property: string]: {
|
|
61
|
+
maxLength?: number,
|
|
62
|
+
minLength?: number,
|
|
63
|
+
pattern?: string,
|
|
64
|
+
maximum?: number,
|
|
65
|
+
exclusiveMaximum?: boolean,
|
|
66
|
+
minimum?: number,
|
|
67
|
+
exclusiveMinimum?: boolean,
|
|
68
|
+
multipleOf?: number,
|
|
69
|
+
maxItems?: number,
|
|
70
|
+
minItems?: number,
|
|
71
|
+
uniqueItems?: boolean
|
|
72
|
+
}
|
|
73
|
+
} = {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the ZipFileResult interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfZipFileResult(value: object): value is ZipFileResult {
|
|
81
|
+
if (!('zipPath' in value) || value['zipPath'] === undefined) return false;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function ZipFileResultFromJSON(json: any): ZipFileResult {
|
|
86
|
+
return ZipFileResultFromJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function ZipFileResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZipFileResult {
|
|
90
|
+
if (json == null) {
|
|
91
|
+
return json;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'zipPath': json['zip_path'],
|
|
96
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
97
|
+
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
98
|
+
'workflowId': json['workflow_id'] == null ? undefined : json['workflow_id'],
|
|
99
|
+
'skipped': json['skipped'] == null ? undefined : json['skipped'],
|
|
100
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ZipFileResultToJSON(json: any): ZipFileResult {
|
|
105
|
+
return ZipFileResultToJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ZipFileResultToJSONTyped(value?: ZipFileResult | null, ignoreDiscriminator: boolean = false): any {
|
|
109
|
+
if (value == null) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'zip_path': value['zipPath'],
|
|
116
|
+
'document_id': value['documentId'],
|
|
117
|
+
'document_version_id': value['documentVersionId'],
|
|
118
|
+
'workflow_id': value['workflowId'],
|
|
119
|
+
'skipped': value['skipped'],
|
|
120
|
+
'error': value['error'],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -141,6 +141,7 @@ export * from './IdpType';
|
|
|
141
141
|
export * from './ImageTaxonomy';
|
|
142
142
|
export * from './InformationStatistics';
|
|
143
143
|
export * from './IngestDocumentResponse';
|
|
144
|
+
export * from './IngestZipResponse';
|
|
144
145
|
export * from './IngestionMode';
|
|
145
146
|
export * from './Input';
|
|
146
147
|
export * from './InputOrigin';
|
|
@@ -359,3 +360,4 @@ export * from './XlsxCellAnchorInput';
|
|
|
359
360
|
export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
360
361
|
export * from './XlsxCellAnchorOutput';
|
|
361
362
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
363
|
+
export * from './ZipFileResult';
|