@knowledge-stack/ksapi 1.149.1 → 1.151.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 -2
- package/README.md +5 -3
- package/dist/apis/DocumentsApi.d.ts +13 -4
- package/dist/apis/DocumentsApi.js +11 -2
- package/dist/apis/MemoryApi.d.ts +5 -5
- package/dist/apis/MemoryApi.js +1 -1
- package/dist/apis/SystemJobsApi.d.ts +39 -1
- package/dist/apis/SystemJobsApi.js +48 -0
- package/dist/esm/apis/DocumentsApi.d.ts +13 -4
- package/dist/esm/apis/DocumentsApi.js +11 -2
- package/dist/esm/apis/MemoryApi.d.ts +5 -5
- package/dist/esm/apis/MemoryApi.js +2 -2
- package/dist/esm/apis/SystemJobsApi.d.ts +39 -1
- package/dist/esm/apis/SystemJobsApi.js +49 -1
- package/dist/esm/models/DocumentVersionMetadata.d.ts +6 -0
- package/dist/esm/models/DocumentVersionMetadata.js +2 -0
- package/dist/esm/models/IngestZipResponse.d.ts +10 -23
- package/dist/esm/models/IngestZipResponse.js +5 -17
- package/dist/esm/models/ZipIngestionStatusResponse.d.ts +64 -0
- package/dist/esm/models/{ProposedMemoryChunkResponse.js → ZipIngestionStatusResponse.js} +19 -40
- package/dist/esm/models/{ProposedMemoryChunkResponse.d.ts → ZipMemberStatusResponse.d.ts} +23 -37
- package/dist/esm/models/ZipMemberStatusResponse.js +54 -0
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +2 -1
- package/dist/models/DocumentVersionMetadata.d.ts +6 -0
- package/dist/models/DocumentVersionMetadata.js +2 -0
- package/dist/models/IngestZipResponse.d.ts +10 -23
- package/dist/models/IngestZipResponse.js +5 -17
- package/dist/models/ZipIngestionStatusResponse.d.ts +64 -0
- package/dist/models/{ProposedMemoryChunkResponse.js → ZipIngestionStatusResponse.js} +25 -46
- package/dist/models/{ProposedMemoryChunkResponse.d.ts → ZipMemberStatusResponse.d.ts} +23 -37
- package/dist/models/ZipMemberStatusResponse.js +62 -0
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.js +2 -1
- package/docs/DocumentVersionMetadata.md +2 -0
- package/docs/DocumentsApi.md +12 -3
- package/docs/IngestZipResponse.md +4 -10
- package/docs/MemoryApi.md +2 -2
- package/docs/SystemJobsApi.md +76 -0
- package/docs/ZipIngestionStatusResponse.md +39 -0
- package/docs/ZipMemberStatusResponse.md +45 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +25 -4
- package/src/apis/MemoryApi.ts +8 -8
- package/src/apis/SystemJobsApi.ts +86 -0
- package/src/models/DocumentVersionMetadata.ts +8 -0
- package/src/models/IngestZipResponse.ts +15 -37
- package/src/models/ZipIngestionStatusResponse.ts +113 -0
- package/src/models/ZipMemberStatusResponse.ts +123 -0
- package/src/models/index.ts +2 -1
- package/docs/ProposedMemoryChunkResponse.md +0 -48
- package/src/models/ProposedMemoryChunkResponse.ts +0 -163
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedResponseWorkflowSummaryResponse, TemporalWorkflowStatusResponse, WorkflowActionResponse, WorkflowCancelResponse, WorkflowDetailResponse } from '../models/index';
|
|
13
|
+
import type { PaginatedResponseWorkflowSummaryResponse, TemporalWorkflowStatusResponse, WorkflowActionResponse, WorkflowCancelResponse, WorkflowDetailResponse, ZipIngestionStatusResponse } from '../models/index';
|
|
14
14
|
export interface CancelTemporalWorkflowRequest {
|
|
15
15
|
workflowId: string;
|
|
16
16
|
}
|
|
@@ -23,6 +23,9 @@ export interface GetDvWorkflowRequest {
|
|
|
23
23
|
export interface GetTemporalWorkflowStatusRequest {
|
|
24
24
|
workflowId: string;
|
|
25
25
|
}
|
|
26
|
+
export interface GetZipIngestionStatusRequest {
|
|
27
|
+
workflowId: string;
|
|
28
|
+
}
|
|
26
29
|
export interface ListDvWorkflowsRequest {
|
|
27
30
|
limit?: number;
|
|
28
31
|
offset?: number;
|
|
@@ -118,6 +121,27 @@ export interface SystemJobsApiInterface {
|
|
|
118
121
|
* Get Temporal Workflow Status Handler
|
|
119
122
|
*/
|
|
120
123
|
getTemporalWorkflowStatus(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TemporalWorkflowStatusResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Creates request options for getZipIngestionStatus without sending the request
|
|
126
|
+
* @param {string} workflowId
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
* @memberof SystemJobsApiInterface
|
|
129
|
+
*/
|
|
130
|
+
getZipIngestionStatusRequestOpts(requestParameters: GetZipIngestionStatusRequest): Promise<runtime.RequestOpts>;
|
|
131
|
+
/**
|
|
132
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
133
|
+
* @summary Get Zip Ingestion Status Handler
|
|
134
|
+
* @param {string} workflowId
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
* @memberof SystemJobsApiInterface
|
|
138
|
+
*/
|
|
139
|
+
getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>>;
|
|
140
|
+
/**
|
|
141
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
142
|
+
* Get Zip Ingestion Status Handler
|
|
143
|
+
*/
|
|
144
|
+
getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse>;
|
|
121
145
|
/**
|
|
122
146
|
* Creates request options for listDvWorkflows without sending the request
|
|
123
147
|
* @param {number} [limit] Number of items per page
|
|
@@ -202,6 +226,20 @@ export declare class SystemJobsApi extends runtime.BaseAPI implements SystemJobs
|
|
|
202
226
|
* Get Temporal Workflow Status Handler
|
|
203
227
|
*/
|
|
204
228
|
getTemporalWorkflowStatus(requestParameters: GetTemporalWorkflowStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TemporalWorkflowStatusResponse>;
|
|
229
|
+
/**
|
|
230
|
+
* Creates request options for getZipIngestionStatus without sending the request
|
|
231
|
+
*/
|
|
232
|
+
getZipIngestionStatusRequestOpts(requestParameters: GetZipIngestionStatusRequest): Promise<runtime.RequestOpts>;
|
|
233
|
+
/**
|
|
234
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
235
|
+
* Get Zip Ingestion Status Handler
|
|
236
|
+
*/
|
|
237
|
+
getZipIngestionStatusRaw(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZipIngestionStatusResponse>>;
|
|
238
|
+
/**
|
|
239
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
240
|
+
* Get Zip Ingestion Status Handler
|
|
241
|
+
*/
|
|
242
|
+
getZipIngestionStatus(requestParameters: GetZipIngestionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZipIngestionStatusResponse>;
|
|
205
243
|
/**
|
|
206
244
|
* Creates request options for listDvWorkflows without sending the request
|
|
207
245
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedResponseWorkflowSummaryResponseFromJSON, TemporalWorkflowStatusResponseFromJSON, WorkflowActionResponseFromJSON, WorkflowCancelResponseFromJSON, WorkflowDetailResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { PaginatedResponseWorkflowSummaryResponseFromJSON, TemporalWorkflowStatusResponseFromJSON, WorkflowActionResponseFromJSON, WorkflowCancelResponseFromJSON, WorkflowDetailResponseFromJSON, ZipIngestionStatusResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -218,6 +218,54 @@ export class SystemJobsApi extends runtime.BaseAPI {
|
|
|
218
218
|
return yield response.value();
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Creates request options for getZipIngestionStatus without sending the request
|
|
223
|
+
*/
|
|
224
|
+
getZipIngestionStatusRequestOpts(requestParameters) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
if (requestParameters['workflowId'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getZipIngestionStatus().');
|
|
228
|
+
}
|
|
229
|
+
const queryParameters = {};
|
|
230
|
+
const headerParameters = {};
|
|
231
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
232
|
+
const token = this.configuration.accessToken;
|
|
233
|
+
const tokenString = yield token("bearerAuth", []);
|
|
234
|
+
if (tokenString) {
|
|
235
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
let urlPath = `/v1/system-jobs/zip-ingestions/{workflow_id}`;
|
|
239
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
240
|
+
return {
|
|
241
|
+
path: urlPath,
|
|
242
|
+
method: 'GET',
|
|
243
|
+
headers: headerParameters,
|
|
244
|
+
query: queryParameters,
|
|
245
|
+
};
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
250
|
+
* Get Zip Ingestion Status Handler
|
|
251
|
+
*/
|
|
252
|
+
getZipIngestionStatusRaw(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const requestOptions = yield this.getZipIngestionStatusRequestOpts(requestParameters);
|
|
255
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
256
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZipIngestionStatusResponseFromJSON(jsonValue));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Get a ZIP fan-out\'s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\'s ``results`` query (served from retained history), so once Temporal retention expires this 404s.
|
|
261
|
+
* Get Zip Ingestion Status Handler
|
|
262
|
+
*/
|
|
263
|
+
getZipIngestionStatus(requestParameters, initOverrides) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const response = yield this.getZipIngestionStatusRaw(requestParameters, initOverrides);
|
|
266
|
+
return yield response.value();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
221
269
|
/**
|
|
222
270
|
* Creates request options for listDvWorkflows without sending the request
|
|
223
271
|
*/
|
|
@@ -151,6 +151,12 @@ export interface DocumentVersionMetadata {
|
|
|
151
151
|
* @memberof DocumentVersionMetadata
|
|
152
152
|
*/
|
|
153
153
|
fileMd5?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Opt-in create key. A repeat ingest with the same key at the same (parent, name) replays this document instead of colliding — makes a ZIP fan-out member retry idempotent.
|
|
156
|
+
* @type {string}
|
|
157
|
+
* @memberof DocumentVersionMetadata
|
|
158
|
+
*/
|
|
159
|
+
idempotencyKey?: string | null;
|
|
154
160
|
}
|
|
155
161
|
export declare const DocumentVersionMetadataPropertyValidationAttributesMap: {
|
|
156
162
|
[property: string]: {
|
|
@@ -49,6 +49,7 @@ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator)
|
|
|
49
49
|
'quotaPageCount': json['quota_page_count'] == null ? undefined : json['quota_page_count'],
|
|
50
50
|
'quotaIdempotencyKey': json['quota_idempotency_key'] == null ? undefined : json['quota_idempotency_key'],
|
|
51
51
|
'fileMd5': json['file_md5'] == null ? undefined : json['file_md5'],
|
|
52
|
+
'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
export function DocumentVersionMetadataToJSON(json) {
|
|
@@ -79,5 +80,6 @@ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator =
|
|
|
79
80
|
'quota_page_count': value['quotaPageCount'],
|
|
80
81
|
'quota_idempotency_key': value['quotaIdempotencyKey'],
|
|
81
82
|
'file_md5': value['fileMd5'],
|
|
83
|
+
'idempotency_key': value['idempotencyKey'],
|
|
82
84
|
};
|
|
83
85
|
}
|
|
@@ -11,41 +11,28 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { ZipFileResult } from './ZipFileResult';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Response from dispatching a ZIP archive to async ingestion.
|
|
15
|
+
*
|
|
16
|
+
* ``workflow_id`` is the fan-out workflow to poll at
|
|
17
|
+
* ``GET /v1/system-jobs/zip-ingestions/{workflow_id}`` for per-member outcomes;
|
|
18
|
+
* it is None when the archive held no ingestible members. ``skipped`` are the
|
|
19
|
+
* artifact/error entries resolved synchronously during classification.
|
|
15
20
|
* @export
|
|
16
21
|
* @interface IngestZipResponse
|
|
17
22
|
*/
|
|
18
23
|
export interface IngestZipResponse {
|
|
19
24
|
/**
|
|
20
25
|
*
|
|
21
|
-
* @type {
|
|
22
|
-
* @memberof IngestZipResponse
|
|
23
|
-
*/
|
|
24
|
-
files: Array<ZipFileResult>;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {number}
|
|
26
|
+
* @type {string}
|
|
28
27
|
* @memberof IngestZipResponse
|
|
29
28
|
*/
|
|
30
|
-
|
|
29
|
+
workflowId: string | null;
|
|
31
30
|
/**
|
|
32
31
|
*
|
|
33
|
-
* @type {
|
|
34
|
-
* @memberof IngestZipResponse
|
|
35
|
-
*/
|
|
36
|
-
succeeded: number;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof IngestZipResponse
|
|
41
|
-
*/
|
|
42
|
-
skipped: number;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {number}
|
|
32
|
+
* @type {Array<ZipFileResult>}
|
|
46
33
|
* @memberof IngestZipResponse
|
|
47
34
|
*/
|
|
48
|
-
|
|
35
|
+
skipped: Array<ZipFileResult>;
|
|
49
36
|
}
|
|
50
37
|
export declare const IngestZipResponsePropertyValidationAttributesMap: {
|
|
51
38
|
[property: string]: {
|
|
@@ -17,16 +17,10 @@ export const IngestZipResponsePropertyValidationAttributesMap = {};
|
|
|
17
17
|
* Check if a given object implements the IngestZipResponse interface.
|
|
18
18
|
*/
|
|
19
19
|
export function instanceOfIngestZipResponse(value) {
|
|
20
|
-
if (!('
|
|
21
|
-
return false;
|
|
22
|
-
if (!('totalFound' in value) || value['totalFound'] === undefined)
|
|
23
|
-
return false;
|
|
24
|
-
if (!('succeeded' in value) || value['succeeded'] === undefined)
|
|
20
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
25
21
|
return false;
|
|
26
22
|
if (!('skipped' in value) || value['skipped'] === undefined)
|
|
27
23
|
return false;
|
|
28
|
-
if (!('failed' in value) || value['failed'] === undefined)
|
|
29
|
-
return false;
|
|
30
24
|
return true;
|
|
31
25
|
}
|
|
32
26
|
export function IngestZipResponseFromJSON(json) {
|
|
@@ -37,11 +31,8 @@ export function IngestZipResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
31
|
return json;
|
|
38
32
|
}
|
|
39
33
|
return {
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'succeeded': json['succeeded'],
|
|
43
|
-
'skipped': json['skipped'],
|
|
44
|
-
'failed': json['failed'],
|
|
34
|
+
'workflowId': json['workflow_id'],
|
|
35
|
+
'skipped': (json['skipped'].map(ZipFileResultFromJSON)),
|
|
45
36
|
};
|
|
46
37
|
}
|
|
47
38
|
export function IngestZipResponseToJSON(json) {
|
|
@@ -52,10 +43,7 @@ export function IngestZipResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
52
43
|
return value;
|
|
53
44
|
}
|
|
54
45
|
return {
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'succeeded': value['succeeded'],
|
|
58
|
-
'skipped': value['skipped'],
|
|
59
|
-
'failed': value['failed'],
|
|
46
|
+
'workflow_id': value['workflowId'],
|
|
47
|
+
'skipped': (value['skipped'].map(ZipFileResultToJSON)),
|
|
60
48
|
};
|
|
61
49
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { ZipMemberStatusResponse } from './ZipMemberStatusResponse';
|
|
13
|
+
/**
|
|
14
|
+
* Status of a ZIP fan-out: live Temporal state + per-member outcomes.
|
|
15
|
+
*
|
|
16
|
+
* ``files`` reflects progress so far — members that have been dispatched
|
|
17
|
+
* (``workflow_id`` set), failed to dispatch (``error`` set), or were skipped as
|
|
18
|
+
* artifacts. Poll until ``temporal_status`` is terminal (e.g. ``COMPLETED``).
|
|
19
|
+
* @export
|
|
20
|
+
* @interface ZipIngestionStatusResponse
|
|
21
|
+
*/
|
|
22
|
+
export interface ZipIngestionStatusResponse {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof ZipIngestionStatusResponse
|
|
27
|
+
*/
|
|
28
|
+
workflowId: string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ZipIngestionStatusResponse
|
|
33
|
+
*/
|
|
34
|
+
temporalStatus: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {Array<ZipMemberStatusResponse>}
|
|
38
|
+
* @memberof ZipIngestionStatusResponse
|
|
39
|
+
*/
|
|
40
|
+
files: Array<ZipMemberStatusResponse>;
|
|
41
|
+
}
|
|
42
|
+
export declare const ZipIngestionStatusResponsePropertyValidationAttributesMap: {
|
|
43
|
+
[property: string]: {
|
|
44
|
+
maxLength?: number;
|
|
45
|
+
minLength?: number;
|
|
46
|
+
pattern?: string;
|
|
47
|
+
maximum?: number;
|
|
48
|
+
exclusiveMaximum?: boolean;
|
|
49
|
+
minimum?: number;
|
|
50
|
+
exclusiveMinimum?: boolean;
|
|
51
|
+
multipleOf?: number;
|
|
52
|
+
maxItems?: number;
|
|
53
|
+
minItems?: number;
|
|
54
|
+
uniqueItems?: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the ZipIngestionStatusResponse interface.
|
|
59
|
+
*/
|
|
60
|
+
export declare function instanceOfZipIngestionStatusResponse(value: object): value is ZipIngestionStatusResponse;
|
|
61
|
+
export declare function ZipIngestionStatusResponseFromJSON(json: any): ZipIngestionStatusResponse;
|
|
62
|
+
export declare function ZipIngestionStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZipIngestionStatusResponse;
|
|
63
|
+
export declare function ZipIngestionStatusResponseToJSON(json: any): ZipIngestionStatusResponse;
|
|
64
|
+
export declare function ZipIngestionStatusResponseToJSONTyped(value?: ZipIngestionStatusResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,64 +11,43 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
export const ProposedMemoryChunkResponsePropertyValidationAttributesMap = {};
|
|
14
|
+
import { ZipMemberStatusResponseFromJSON, ZipMemberStatusResponseToJSON, } from './ZipMemberStatusResponse';
|
|
15
|
+
export const ZipIngestionStatusResponsePropertyValidationAttributesMap = {};
|
|
17
16
|
/**
|
|
18
|
-
* Check if a given object implements the
|
|
17
|
+
* Check if a given object implements the ZipIngestionStatusResponse interface.
|
|
19
18
|
*/
|
|
20
|
-
export function
|
|
21
|
-
if (!('
|
|
19
|
+
export function instanceOfZipIngestionStatusResponse(value) {
|
|
20
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined)
|
|
22
21
|
return false;
|
|
23
|
-
if (!('
|
|
22
|
+
if (!('temporalStatus' in value) || value['temporalStatus'] === undefined)
|
|
24
23
|
return false;
|
|
25
|
-
if (!('
|
|
26
|
-
return false;
|
|
27
|
-
if (!('kind' in value) || value['kind'] === undefined)
|
|
28
|
-
return false;
|
|
29
|
-
if (!('rationale' in value) || value['rationale'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('body' in value) || value['body'] === undefined)
|
|
32
|
-
return false;
|
|
33
|
-
if (!('proposerTenantUserId' in value) || value['proposerTenantUserId'] === undefined)
|
|
34
|
-
return false;
|
|
35
|
-
if (!('runId' in value) || value['runId'] === undefined)
|
|
24
|
+
if (!('files' in value) || value['files'] === undefined)
|
|
36
25
|
return false;
|
|
37
26
|
return true;
|
|
38
27
|
}
|
|
39
|
-
export function
|
|
40
|
-
return
|
|
28
|
+
export function ZipIngestionStatusResponseFromJSON(json) {
|
|
29
|
+
return ZipIngestionStatusResponseFromJSONTyped(json, false);
|
|
41
30
|
}
|
|
42
|
-
export function
|
|
31
|
+
export function ZipIngestionStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
32
|
if (json == null) {
|
|
44
33
|
return json;
|
|
45
34
|
}
|
|
46
35
|
return {
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'kind': MemoryKindFromJSON(json['kind']),
|
|
51
|
-
'rationale': json['rationale'],
|
|
52
|
-
'body': json['body'],
|
|
53
|
-
'proposerTenantUserId': json['proposer_tenant_user_id'],
|
|
54
|
-
'runId': json['run_id'],
|
|
36
|
+
'workflowId': json['workflow_id'],
|
|
37
|
+
'temporalStatus': json['temporal_status'],
|
|
38
|
+
'files': (json['files'].map(ZipMemberStatusResponseFromJSON)),
|
|
55
39
|
};
|
|
56
40
|
}
|
|
57
|
-
export function
|
|
58
|
-
return
|
|
41
|
+
export function ZipIngestionStatusResponseToJSON(json) {
|
|
42
|
+
return ZipIngestionStatusResponseToJSONTyped(json, false);
|
|
59
43
|
}
|
|
60
|
-
export function
|
|
44
|
+
export function ZipIngestionStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
45
|
if (value == null) {
|
|
62
46
|
return value;
|
|
63
47
|
}
|
|
64
48
|
return {
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'kind': MemoryKindToJSON(value['kind']),
|
|
69
|
-
'rationale': value['rationale'],
|
|
70
|
-
'body': value['body'],
|
|
71
|
-
'proposer_tenant_user_id': value['proposerTenantUserId'],
|
|
72
|
-
'run_id': value['runId'],
|
|
49
|
+
'workflow_id': value['workflowId'],
|
|
50
|
+
'temporal_status': value['temporalStatus'],
|
|
51
|
+
'files': (value['files'].map(ZipMemberStatusResponseToJSON)),
|
|
73
52
|
};
|
|
74
53
|
}
|
|
@@ -9,64 +9,50 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type { MemoryScope } from './MemoryScope';
|
|
13
|
-
import type { MemoryKind } from './MemoryKind';
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
13
|
+
* One member's outcome within a ZIP fan-out (from the workflow query).
|
|
16
14
|
* @export
|
|
17
|
-
* @interface
|
|
15
|
+
* @interface ZipMemberStatusResponse
|
|
18
16
|
*/
|
|
19
|
-
export interface
|
|
17
|
+
export interface ZipMemberStatusResponse {
|
|
20
18
|
/**
|
|
21
19
|
*
|
|
22
20
|
* @type {string}
|
|
23
|
-
* @memberof
|
|
24
|
-
*/
|
|
25
|
-
chunkId: string;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @type {MemoryScope}
|
|
29
|
-
* @memberof ProposedMemoryChunkResponse
|
|
21
|
+
* @memberof ZipMemberStatusResponse
|
|
30
22
|
*/
|
|
31
|
-
|
|
23
|
+
zipPath: string;
|
|
32
24
|
/**
|
|
33
25
|
*
|
|
34
26
|
* @type {string}
|
|
35
|
-
* @memberof
|
|
27
|
+
* @memberof ZipMemberStatusResponse
|
|
36
28
|
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @type {MemoryKind}
|
|
41
|
-
* @memberof ProposedMemoryChunkResponse
|
|
42
|
-
*/
|
|
43
|
-
kind: MemoryKind;
|
|
29
|
+
documentId?: string | null;
|
|
44
30
|
/**
|
|
45
31
|
*
|
|
46
32
|
* @type {string}
|
|
47
|
-
* @memberof
|
|
33
|
+
* @memberof ZipMemberStatusResponse
|
|
48
34
|
*/
|
|
49
|
-
|
|
35
|
+
documentVersionId?: string | null;
|
|
50
36
|
/**
|
|
51
37
|
*
|
|
52
38
|
* @type {string}
|
|
53
|
-
* @memberof
|
|
39
|
+
* @memberof ZipMemberStatusResponse
|
|
54
40
|
*/
|
|
55
|
-
|
|
41
|
+
workflowId?: string | null;
|
|
56
42
|
/**
|
|
57
43
|
*
|
|
58
44
|
* @type {string}
|
|
59
|
-
* @memberof
|
|
45
|
+
* @memberof ZipMemberStatusResponse
|
|
60
46
|
*/
|
|
61
|
-
|
|
47
|
+
error?: string | null;
|
|
62
48
|
/**
|
|
63
49
|
*
|
|
64
|
-
* @type {
|
|
65
|
-
* @memberof
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof ZipMemberStatusResponse
|
|
66
52
|
*/
|
|
67
|
-
|
|
53
|
+
skipped?: boolean;
|
|
68
54
|
}
|
|
69
|
-
export declare const
|
|
55
|
+
export declare const ZipMemberStatusResponsePropertyValidationAttributesMap: {
|
|
70
56
|
[property: string]: {
|
|
71
57
|
maxLength?: number;
|
|
72
58
|
minLength?: number;
|
|
@@ -82,10 +68,10 @@ export declare const ProposedMemoryChunkResponsePropertyValidationAttributesMap:
|
|
|
82
68
|
};
|
|
83
69
|
};
|
|
84
70
|
/**
|
|
85
|
-
* Check if a given object implements the
|
|
71
|
+
* Check if a given object implements the ZipMemberStatusResponse interface.
|
|
86
72
|
*/
|
|
87
|
-
export declare function
|
|
88
|
-
export declare function
|
|
89
|
-
export declare function
|
|
90
|
-
export declare function
|
|
91
|
-
export declare function
|
|
73
|
+
export declare function instanceOfZipMemberStatusResponse(value: object): value is ZipMemberStatusResponse;
|
|
74
|
+
export declare function ZipMemberStatusResponseFromJSON(json: any): ZipMemberStatusResponse;
|
|
75
|
+
export declare function ZipMemberStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZipMemberStatusResponse;
|
|
76
|
+
export declare function ZipMemberStatusResponseToJSON(json: any): ZipMemberStatusResponse;
|
|
77
|
+
export declare function ZipMemberStatusResponseToJSONTyped(value?: ZipMemberStatusResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 ZipMemberStatusResponsePropertyValidationAttributesMap = {};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ZipMemberStatusResponse interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfZipMemberStatusResponse(value) {
|
|
19
|
+
if (!('zipPath' in value) || value['zipPath'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function ZipMemberStatusResponseFromJSON(json) {
|
|
24
|
+
return ZipMemberStatusResponseFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function ZipMemberStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'zipPath': json['zip_path'],
|
|
32
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
33
|
+
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
34
|
+
'workflowId': json['workflow_id'] == null ? undefined : json['workflow_id'],
|
|
35
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
36
|
+
'skipped': json['skipped'] == null ? undefined : json['skipped'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function ZipMemberStatusResponseToJSON(json) {
|
|
40
|
+
return ZipMemberStatusResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function ZipMemberStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'zip_path': value['zipPath'],
|
|
48
|
+
'document_id': value['documentId'],
|
|
49
|
+
'document_version_id': value['documentVersionId'],
|
|
50
|
+
'workflow_id': value['workflowId'],
|
|
51
|
+
'error': value['error'],
|
|
52
|
+
'skipped': value['skipped'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -223,7 +223,6 @@ export * from './PixelRegion';
|
|
|
223
223
|
export * from './Polygon';
|
|
224
224
|
export * from './PolygonReference';
|
|
225
225
|
export * from './ProposeMemoryChunkRequest';
|
|
226
|
-
export * from './ProposedMemoryChunkResponse';
|
|
227
226
|
export * from './ReasoningPart';
|
|
228
227
|
export * from './ReferenceType';
|
|
229
228
|
export * from './ReorderPathPartRequest';
|
|
@@ -361,3 +360,5 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
361
360
|
export * from './XlsxCellAnchorOutput';
|
|
362
361
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
363
362
|
export * from './ZipFileResult';
|
|
363
|
+
export * from './ZipIngestionStatusResponse';
|
|
364
|
+
export * from './ZipMemberStatusResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -225,7 +225,6 @@ export * from './PixelRegion';
|
|
|
225
225
|
export * from './Polygon';
|
|
226
226
|
export * from './PolygonReference';
|
|
227
227
|
export * from './ProposeMemoryChunkRequest';
|
|
228
|
-
export * from './ProposedMemoryChunkResponse';
|
|
229
228
|
export * from './ReasoningPart';
|
|
230
229
|
export * from './ReferenceType';
|
|
231
230
|
export * from './ReorderPathPartRequest';
|
|
@@ -363,3 +362,5 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
363
362
|
export * from './XlsxCellAnchorOutput';
|
|
364
363
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
365
364
|
export * from './ZipFileResult';
|
|
365
|
+
export * from './ZipIngestionStatusResponse';
|
|
366
|
+
export * from './ZipMemberStatusResponse';
|
|
@@ -151,6 +151,12 @@ export interface DocumentVersionMetadata {
|
|
|
151
151
|
* @memberof DocumentVersionMetadata
|
|
152
152
|
*/
|
|
153
153
|
fileMd5?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Opt-in create key. A repeat ingest with the same key at the same (parent, name) replays this document instead of colliding — makes a ZIP fan-out member retry idempotent.
|
|
156
|
+
* @type {string}
|
|
157
|
+
* @memberof DocumentVersionMetadata
|
|
158
|
+
*/
|
|
159
|
+
idempotencyKey?: string | null;
|
|
154
160
|
}
|
|
155
161
|
export declare const DocumentVersionMetadataPropertyValidationAttributesMap: {
|
|
156
162
|
[property: string]: {
|
|
@@ -57,6 +57,7 @@ function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
57
|
'quotaPageCount': json['quota_page_count'] == null ? undefined : json['quota_page_count'],
|
|
58
58
|
'quotaIdempotencyKey': json['quota_idempotency_key'] == null ? undefined : json['quota_idempotency_key'],
|
|
59
59
|
'fileMd5': json['file_md5'] == null ? undefined : json['file_md5'],
|
|
60
|
+
'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
function DocumentVersionMetadataToJSON(json) {
|
|
@@ -87,5 +88,6 @@ function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
87
88
|
'quota_page_count': value['quotaPageCount'],
|
|
88
89
|
'quota_idempotency_key': value['quotaIdempotencyKey'],
|
|
89
90
|
'file_md5': value['fileMd5'],
|
|
91
|
+
'idempotency_key': value['idempotencyKey'],
|
|
90
92
|
};
|
|
91
93
|
}
|