@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
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
import type { ZipMemberStatusResponse } from './ZipMemberStatusResponse';
|
|
17
|
+
import {
|
|
18
|
+
ZipMemberStatusResponseFromJSON,
|
|
19
|
+
ZipMemberStatusResponseFromJSONTyped,
|
|
20
|
+
ZipMemberStatusResponseToJSON,
|
|
21
|
+
ZipMemberStatusResponseToJSONTyped,
|
|
22
|
+
} from './ZipMemberStatusResponse';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Status of a ZIP fan-out: live Temporal state + per-member outcomes.
|
|
26
|
+
*
|
|
27
|
+
* ``files`` reflects progress so far — members that have been dispatched
|
|
28
|
+
* (``workflow_id`` set), failed to dispatch (``error`` set), or were skipped as
|
|
29
|
+
* artifacts. Poll until ``temporal_status`` is terminal (e.g. ``COMPLETED``).
|
|
30
|
+
* @export
|
|
31
|
+
* @interface ZipIngestionStatusResponse
|
|
32
|
+
*/
|
|
33
|
+
export interface ZipIngestionStatusResponse {
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ZipIngestionStatusResponse
|
|
38
|
+
*/
|
|
39
|
+
workflowId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ZipIngestionStatusResponse
|
|
44
|
+
*/
|
|
45
|
+
temporalStatus: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Array<ZipMemberStatusResponse>}
|
|
49
|
+
* @memberof ZipIngestionStatusResponse
|
|
50
|
+
*/
|
|
51
|
+
files: Array<ZipMemberStatusResponse>;
|
|
52
|
+
}
|
|
53
|
+
export const ZipIngestionStatusResponsePropertyValidationAttributesMap: {
|
|
54
|
+
[property: string]: {
|
|
55
|
+
maxLength?: number,
|
|
56
|
+
minLength?: number,
|
|
57
|
+
pattern?: string,
|
|
58
|
+
maximum?: number,
|
|
59
|
+
exclusiveMaximum?: boolean,
|
|
60
|
+
minimum?: number,
|
|
61
|
+
exclusiveMinimum?: boolean,
|
|
62
|
+
multipleOf?: number,
|
|
63
|
+
maxItems?: number,
|
|
64
|
+
minItems?: number,
|
|
65
|
+
uniqueItems?: boolean
|
|
66
|
+
}
|
|
67
|
+
} = {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the ZipIngestionStatusResponse interface.
|
|
73
|
+
*/
|
|
74
|
+
export function instanceOfZipIngestionStatusResponse(value: object): value is ZipIngestionStatusResponse {
|
|
75
|
+
if (!('workflowId' in value) || value['workflowId'] === undefined) return false;
|
|
76
|
+
if (!('temporalStatus' in value) || value['temporalStatus'] === undefined) return false;
|
|
77
|
+
if (!('files' in value) || value['files'] === undefined) return false;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ZipIngestionStatusResponseFromJSON(json: any): ZipIngestionStatusResponse {
|
|
82
|
+
return ZipIngestionStatusResponseFromJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function ZipIngestionStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZipIngestionStatusResponse {
|
|
86
|
+
if (json == null) {
|
|
87
|
+
return json;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
|
|
91
|
+
'workflowId': json['workflow_id'],
|
|
92
|
+
'temporalStatus': json['temporal_status'],
|
|
93
|
+
'files': ((json['files'] as Array<any>).map(ZipMemberStatusResponseFromJSON)),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ZipIngestionStatusResponseToJSON(json: any): ZipIngestionStatusResponse {
|
|
98
|
+
return ZipIngestionStatusResponseToJSONTyped(json, false);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function ZipIngestionStatusResponseToJSONTyped(value?: ZipIngestionStatusResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
102
|
+
if (value == null) {
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
|
|
108
|
+
'workflow_id': value['workflowId'],
|
|
109
|
+
'temporal_status': value['temporalStatus'],
|
|
110
|
+
'files': ((value['files'] as Array<any>).map(ZipMemberStatusResponseToJSON)),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -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
|
+
* One member's outcome within a ZIP fan-out (from the workflow query).
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ZipMemberStatusResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ZipMemberStatusResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ZipMemberStatusResponse
|
|
26
|
+
*/
|
|
27
|
+
zipPath: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ZipMemberStatusResponse
|
|
32
|
+
*/
|
|
33
|
+
documentId?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ZipMemberStatusResponse
|
|
38
|
+
*/
|
|
39
|
+
documentVersionId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ZipMemberStatusResponse
|
|
44
|
+
*/
|
|
45
|
+
workflowId?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ZipMemberStatusResponse
|
|
50
|
+
*/
|
|
51
|
+
error?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof ZipMemberStatusResponse
|
|
56
|
+
*/
|
|
57
|
+
skipped?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export const ZipMemberStatusResponsePropertyValidationAttributesMap: {
|
|
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 ZipMemberStatusResponse interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfZipMemberStatusResponse(value: object): value is ZipMemberStatusResponse {
|
|
81
|
+
if (!('zipPath' in value) || value['zipPath'] === undefined) return false;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function ZipMemberStatusResponseFromJSON(json: any): ZipMemberStatusResponse {
|
|
86
|
+
return ZipMemberStatusResponseFromJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function ZipMemberStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ZipMemberStatusResponse {
|
|
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
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
100
|
+
'skipped': json['skipped'] == null ? undefined : json['skipped'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ZipMemberStatusResponseToJSON(json: any): ZipMemberStatusResponse {
|
|
105
|
+
return ZipMemberStatusResponseToJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ZipMemberStatusResponseToJSONTyped(value?: ZipMemberStatusResponse | 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
|
+
'error': value['error'],
|
|
120
|
+
'skipped': value['skipped'],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
package/src/models/index.ts
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';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# ProposedMemoryChunkResponse
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`chunkId` | string
|
|
10
|
-
`scope` | [MemoryScope](MemoryScope.md)
|
|
11
|
-
`ownerPathPartId` | string
|
|
12
|
-
`kind` | [MemoryKind](MemoryKind.md)
|
|
13
|
-
`rationale` | string
|
|
14
|
-
`body` | string
|
|
15
|
-
`proposerTenantUserId` | string
|
|
16
|
-
`runId` | string
|
|
17
|
-
|
|
18
|
-
## Example
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import type { ProposedMemoryChunkResponse } from '@knowledge-stack/ksapi'
|
|
22
|
-
|
|
23
|
-
// TODO: Update the object below with actual values
|
|
24
|
-
const example = {
|
|
25
|
-
"chunkId": null,
|
|
26
|
-
"scope": null,
|
|
27
|
-
"ownerPathPartId": null,
|
|
28
|
-
"kind": null,
|
|
29
|
-
"rationale": null,
|
|
30
|
-
"body": null,
|
|
31
|
-
"proposerTenantUserId": null,
|
|
32
|
-
"runId": null,
|
|
33
|
-
} satisfies ProposedMemoryChunkResponse
|
|
34
|
-
|
|
35
|
-
console.log(example)
|
|
36
|
-
|
|
37
|
-
// Convert the instance to a JSON string
|
|
38
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
-
console.log(exampleJSON)
|
|
40
|
-
|
|
41
|
-
// Parse the JSON string back to an object
|
|
42
|
-
const exampleParsed = JSON.parse(exampleJSON) as ProposedMemoryChunkResponse
|
|
43
|
-
console.log(exampleParsed)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
-
|
|
48
|
-
|
|
@@ -1,163 +0,0 @@
|
|
|
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
|
-
import type { MemoryScope } from './MemoryScope';
|
|
17
|
-
import {
|
|
18
|
-
MemoryScopeFromJSON,
|
|
19
|
-
MemoryScopeFromJSONTyped,
|
|
20
|
-
MemoryScopeToJSON,
|
|
21
|
-
MemoryScopeToJSONTyped,
|
|
22
|
-
} from './MemoryScope';
|
|
23
|
-
import type { MemoryKind } from './MemoryKind';
|
|
24
|
-
import {
|
|
25
|
-
MemoryKindFromJSON,
|
|
26
|
-
MemoryKindFromJSONTyped,
|
|
27
|
-
MemoryKindToJSON,
|
|
28
|
-
MemoryKindToJSONTyped,
|
|
29
|
-
} from './MemoryKind';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @export
|
|
34
|
-
* @interface ProposedMemoryChunkResponse
|
|
35
|
-
*/
|
|
36
|
-
export interface ProposedMemoryChunkResponse {
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {string}
|
|
40
|
-
* @memberof ProposedMemoryChunkResponse
|
|
41
|
-
*/
|
|
42
|
-
chunkId: string;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {MemoryScope}
|
|
46
|
-
* @memberof ProposedMemoryChunkResponse
|
|
47
|
-
*/
|
|
48
|
-
scope: MemoryScope;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @type {string}
|
|
52
|
-
* @memberof ProposedMemoryChunkResponse
|
|
53
|
-
*/
|
|
54
|
-
ownerPathPartId: string;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {MemoryKind}
|
|
58
|
-
* @memberof ProposedMemoryChunkResponse
|
|
59
|
-
*/
|
|
60
|
-
kind: MemoryKind;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {string}
|
|
64
|
-
* @memberof ProposedMemoryChunkResponse
|
|
65
|
-
*/
|
|
66
|
-
rationale: string;
|
|
67
|
-
/**
|
|
68
|
-
*
|
|
69
|
-
* @type {string}
|
|
70
|
-
* @memberof ProposedMemoryChunkResponse
|
|
71
|
-
*/
|
|
72
|
-
body: string;
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @type {string}
|
|
76
|
-
* @memberof ProposedMemoryChunkResponse
|
|
77
|
-
*/
|
|
78
|
-
proposerTenantUserId: string;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @type {string}
|
|
82
|
-
* @memberof ProposedMemoryChunkResponse
|
|
83
|
-
*/
|
|
84
|
-
runId: string | null;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
export const ProposedMemoryChunkResponsePropertyValidationAttributesMap: {
|
|
89
|
-
[property: string]: {
|
|
90
|
-
maxLength?: number,
|
|
91
|
-
minLength?: number,
|
|
92
|
-
pattern?: string,
|
|
93
|
-
maximum?: number,
|
|
94
|
-
exclusiveMaximum?: boolean,
|
|
95
|
-
minimum?: number,
|
|
96
|
-
exclusiveMinimum?: boolean,
|
|
97
|
-
multipleOf?: number,
|
|
98
|
-
maxItems?: number,
|
|
99
|
-
minItems?: number,
|
|
100
|
-
uniqueItems?: boolean
|
|
101
|
-
}
|
|
102
|
-
} = {
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Check if a given object implements the ProposedMemoryChunkResponse interface.
|
|
108
|
-
*/
|
|
109
|
-
export function instanceOfProposedMemoryChunkResponse(value: object): value is ProposedMemoryChunkResponse {
|
|
110
|
-
if (!('chunkId' in value) || value['chunkId'] === undefined) return false;
|
|
111
|
-
if (!('scope' in value) || value['scope'] === undefined) return false;
|
|
112
|
-
if (!('ownerPathPartId' in value) || value['ownerPathPartId'] === undefined) return false;
|
|
113
|
-
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
114
|
-
if (!('rationale' in value) || value['rationale'] === undefined) return false;
|
|
115
|
-
if (!('body' in value) || value['body'] === undefined) return false;
|
|
116
|
-
if (!('proposerTenantUserId' in value) || value['proposerTenantUserId'] === undefined) return false;
|
|
117
|
-
if (!('runId' in value) || value['runId'] === undefined) return false;
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export function ProposedMemoryChunkResponseFromJSON(json: any): ProposedMemoryChunkResponse {
|
|
122
|
-
return ProposedMemoryChunkResponseFromJSONTyped(json, false);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function ProposedMemoryChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProposedMemoryChunkResponse {
|
|
126
|
-
if (json == null) {
|
|
127
|
-
return json;
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
|
|
131
|
-
'chunkId': json['chunk_id'],
|
|
132
|
-
'scope': MemoryScopeFromJSON(json['scope']),
|
|
133
|
-
'ownerPathPartId': json['owner_path_part_id'],
|
|
134
|
-
'kind': MemoryKindFromJSON(json['kind']),
|
|
135
|
-
'rationale': json['rationale'],
|
|
136
|
-
'body': json['body'],
|
|
137
|
-
'proposerTenantUserId': json['proposer_tenant_user_id'],
|
|
138
|
-
'runId': json['run_id'],
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export function ProposedMemoryChunkResponseToJSON(json: any): ProposedMemoryChunkResponse {
|
|
143
|
-
return ProposedMemoryChunkResponseToJSONTyped(json, false);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export function ProposedMemoryChunkResponseToJSONTyped(value?: ProposedMemoryChunkResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
147
|
-
if (value == null) {
|
|
148
|
-
return value;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return {
|
|
152
|
-
|
|
153
|
-
'chunk_id': value['chunkId'],
|
|
154
|
-
'scope': MemoryScopeToJSON(value['scope']),
|
|
155
|
-
'owner_path_part_id': value['ownerPathPartId'],
|
|
156
|
-
'kind': MemoryKindToJSON(value['kind']),
|
|
157
|
-
'rationale': value['rationale'],
|
|
158
|
-
'body': value['body'],
|
|
159
|
-
'proposer_tenant_user_id': value['proposerTenantUserId'],
|
|
160
|
-
'run_id': value['runId'],
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
|