@knowledge-stack/ksapi 1.82.0 → 1.84.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 +26 -0
- package/README.md +26 -2
- package/dist/apis/PathPartsApi.d.ts +110 -1
- package/dist/apis/PathPartsApi.js +111 -0
- package/dist/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/apis/WorkflowMemoryApi.js +299 -0
- package/dist/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/apis/WorkflowRunsApi.js +236 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/PathPartsApi.d.ts +110 -1
- package/dist/esm/apis/PathPartsApi.js +112 -1
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/esm/apis/WorkflowMemoryApi.js +262 -0
- package/dist/esm/apis/WorkflowRunsApi.d.ts +233 -1
- package/dist/esm/apis/WorkflowRunsApi.js +237 -1
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AppendEventRequest.d.ts +62 -0
- package/dist/esm/models/AppendEventRequest.js +51 -0
- package/dist/esm/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/esm/models/AppendMemoryChunkRequest.js +52 -0
- package/dist/esm/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/esm/models/ChunkContentItem.d.ts +2 -2
- package/dist/esm/models/ChunkResponse.d.ts +4 -4
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +7 -1
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +2 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -4
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/esm/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/esm/models/EditMemoryChunkRequest.js +49 -0
- package/dist/esm/models/EventResponse.d.ts +83 -0
- package/dist/esm/models/EventResponse.js +64 -0
- package/dist/esm/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/esm/models/ListMemoryChunksResponse.js +45 -0
- package/dist/esm/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/esm/models/MemoryChunkResponse.js +53 -0
- package/dist/esm/models/MemoryKind.d.ts +29 -0
- package/dist/esm/models/MemoryKind.js +47 -0
- package/dist/esm/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseEventResponse.js +70 -0
- package/dist/esm/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/esm/models/PathPartApprovalDecision.js +48 -0
- package/dist/esm/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/esm/models/PathPartApprovalResponse.js +85 -0
- package/dist/esm/models/RejectFileRequest.d.ts +47 -0
- package/dist/esm/models/RejectFileRequest.js +49 -0
- package/dist/esm/models/RunLockResponse.d.ts +59 -0
- package/dist/esm/models/RunLockResponse.js +52 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/esm/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/esm/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/esm/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +7 -1
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +7 -1
- package/dist/esm/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/esm/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/esm/models/WorkflowRunStatus.js +20 -2
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/AppendEventRequest.d.ts +62 -0
- package/dist/models/AppendEventRequest.js +59 -0
- package/dist/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/models/AppendMemoryChunkRequest.js +60 -0
- package/dist/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/models/ChunkContentItem.d.ts +2 -2
- package/dist/models/ChunkResponse.d.ts +4 -4
- package/dist/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +7 -1
- package/dist/models/CreateWorkflowDefinitionRequest.js +2 -0
- package/dist/models/DocumentVersionMetadata.d.ts +4 -4
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/models/EditMemoryChunkRequest.js +57 -0
- package/dist/models/EventResponse.d.ts +83 -0
- package/dist/models/EventResponse.js +72 -0
- package/dist/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/models/ListMemoryChunksResponse.js +53 -0
- package/dist/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/models/MemoryChunkResponse.js +61 -0
- package/dist/models/MemoryKind.d.ts +29 -0
- package/dist/models/MemoryKind.js +55 -0
- package/dist/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseEventResponse.js +78 -0
- package/dist/models/PathPartApprovalDecision.d.ts +30 -0
- package/dist/models/PathPartApprovalDecision.js +56 -0
- package/dist/models/PathPartApprovalResponse.d.ts +111 -0
- package/dist/models/PathPartApprovalResponse.js +93 -0
- package/dist/models/RejectFileRequest.d.ts +47 -0
- package/dist/models/RejectFileRequest.js +57 -0
- package/dist/models/RunLockResponse.d.ts +59 -0
- package/dist/models/RunLockResponse.js +60 -0
- package/dist/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +7 -1
- package/dist/models/UpdateWorkflowDefinitionRequest.js +2 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +7 -1
- package/dist/models/WorkflowDefinitionResponse.js +4 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/models/WorkflowRunStatus.d.ts +20 -2
- package/dist/models/WorkflowRunStatus.js +20 -2
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/AppendEventRequest.md +37 -0
- package/docs/AppendMemoryChunkRequest.md +36 -0
- package/docs/CreateWorkflowDefinitionRequest.md +2 -0
- package/docs/EditMemoryChunkRequest.md +34 -0
- package/docs/EventResponse.md +45 -0
- package/docs/ListMemoryChunksResponse.md +34 -0
- package/docs/MemoryChunkResponse.md +39 -0
- package/docs/MemoryKind.md +33 -0
- package/docs/PaginatedResponseEventResponse.md +40 -0
- package/docs/PathPartApprovalDecision.md +33 -0
- package/docs/PathPartApprovalResponse.md +55 -0
- package/docs/PathPartsApi.md +171 -0
- package/docs/RejectFileRequest.md +35 -0
- package/docs/RunLockResponse.md +39 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +2 -0
- package/docs/WorkflowDefinitionResponse.md +2 -0
- package/docs/WorkflowMemoryApi.md +390 -0
- package/docs/WorkflowRunStatus.md +1 -1
- package/docs/WorkflowRunsApi.md +387 -0
- package/package.json +1 -1
- package/src/apis/PathPartsApi.ts +234 -0
- package/src/apis/WorkflowMemoryApi.ts +522 -0
- package/src/apis/WorkflowRunsApi.ts +479 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AppendEventRequest.ts +102 -0
- package/src/models/AppendMemoryChunkRequest.ts +105 -0
- package/src/models/ChunkBulkResponse.ts +4 -4
- package/src/models/ChunkContentItem.ts +2 -2
- package/src/models/ChunkResponse.ts +4 -4
- package/src/models/CreateThreadMessageRequest.ts +2 -2
- package/src/models/CreateWorkflowDefinitionRequest.ts +9 -1
- package/src/models/DocumentVersionMetadata.ts +4 -4
- package/src/models/DocumentVersionMetadataUpdate.ts +2 -2
- package/src/models/EditMemoryChunkRequest.ts +87 -0
- package/src/models/EventResponse.ts +132 -0
- package/src/models/ListMemoryChunksResponse.ts +91 -0
- package/src/models/MemoryChunkResponse.ts +111 -0
- package/src/models/MemoryKind.ts +57 -0
- package/src/models/PaginatedResponseEventResponse.ts +130 -0
- package/src/models/PathPartApprovalDecision.ts +58 -0
- package/src/models/PathPartApprovalResponse.ts +186 -0
- package/src/models/RejectFileRequest.ts +87 -0
- package/src/models/RunLockResponse.ts +101 -0
- package/src/models/ScoredChunkResponse.ts +4 -4
- package/src/models/SectionSystemMetadata.ts +1 -1
- package/src/models/TenantSettingsUpdate.ts +2 -2
- package/src/models/ThreadMessageDetailsInput.ts +2 -2
- package/src/models/ThreadMessageDetailsOutput.ts +2 -2
- package/src/models/ThreadMessageResponse.ts +2 -2
- package/src/models/UpdateChunkMetadataRequest.ts +2 -2
- package/src/models/UpdateTenantRequest.ts +4 -4
- package/src/models/UpdateWorkflowDefinitionRequest.ts +9 -1
- package/src/models/WorkflowDefinitionResponse.ts +10 -1
- package/src/models/WorkflowRunSnapshot.ts +1 -1
- package/src/models/WorkflowRunStatus.ts +20 -2
- package/src/models/index.ts +12 -0
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AppendMemoryChunkRequest,
|
|
19
|
+
EditMemoryChunkRequest,
|
|
20
|
+
HTTPValidationError,
|
|
21
|
+
ListMemoryChunksResponse,
|
|
22
|
+
MemoryChunkResponse,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
AppendMemoryChunkRequestFromJSON,
|
|
26
|
+
AppendMemoryChunkRequestToJSON,
|
|
27
|
+
EditMemoryChunkRequestFromJSON,
|
|
28
|
+
EditMemoryChunkRequestToJSON,
|
|
29
|
+
HTTPValidationErrorFromJSON,
|
|
30
|
+
HTTPValidationErrorToJSON,
|
|
31
|
+
ListMemoryChunksResponseFromJSON,
|
|
32
|
+
ListMemoryChunksResponseToJSON,
|
|
33
|
+
MemoryChunkResponseFromJSON,
|
|
34
|
+
MemoryChunkResponseToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface AppendWorkflowMemoryChunkRequest {
|
|
38
|
+
definitionId: string;
|
|
39
|
+
appendMemoryChunkRequest: AppendMemoryChunkRequest;
|
|
40
|
+
authorization?: string | null;
|
|
41
|
+
ksUat?: string | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface EditWorkflowMemoryChunkRequest {
|
|
45
|
+
definitionId: string;
|
|
46
|
+
chunkId: string;
|
|
47
|
+
editMemoryChunkRequest: EditMemoryChunkRequest;
|
|
48
|
+
authorization?: string | null;
|
|
49
|
+
ksUat?: string | null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ForgetWorkflowMemoryChunkRequest {
|
|
53
|
+
definitionId: string;
|
|
54
|
+
chunkId: string;
|
|
55
|
+
authorization?: string | null;
|
|
56
|
+
ksUat?: string | null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface GetWorkflowMemoryChunkRequest {
|
|
60
|
+
definitionId: string;
|
|
61
|
+
chunkId: string;
|
|
62
|
+
authorization?: string | null;
|
|
63
|
+
ksUat?: string | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ListWorkflowMemoryChunksRequest {
|
|
67
|
+
definitionId: string;
|
|
68
|
+
authorization?: string | null;
|
|
69
|
+
ksUat?: string | null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* WorkflowMemoryApi - interface
|
|
74
|
+
*
|
|
75
|
+
* @export
|
|
76
|
+
* @interface WorkflowMemoryApiInterface
|
|
77
|
+
*/
|
|
78
|
+
export interface WorkflowMemoryApiInterface {
|
|
79
|
+
/**
|
|
80
|
+
* Creates request options for appendWorkflowMemoryChunk without sending the request
|
|
81
|
+
* @param {string} definitionId
|
|
82
|
+
* @param {AppendMemoryChunkRequest} appendMemoryChunkRequest
|
|
83
|
+
* @param {string} [authorization]
|
|
84
|
+
* @param {string} [ksUat]
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
* @memberof WorkflowMemoryApiInterface
|
|
87
|
+
*/
|
|
88
|
+
appendWorkflowMemoryChunkRequestOpts(requestParameters: AppendWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
92
|
+
* @summary Append Workflow Memory Chunk Handler
|
|
93
|
+
* @param {string} definitionId
|
|
94
|
+
* @param {AppendMemoryChunkRequest} appendMemoryChunkRequest
|
|
95
|
+
* @param {string} [authorization]
|
|
96
|
+
* @param {string} [ksUat]
|
|
97
|
+
* @param {*} [options] Override http request option.
|
|
98
|
+
* @throws {RequiredError}
|
|
99
|
+
* @memberof WorkflowMemoryApiInterface
|
|
100
|
+
*/
|
|
101
|
+
appendWorkflowMemoryChunkRaw(requestParameters: AppendWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
105
|
+
* Append Workflow Memory Chunk Handler
|
|
106
|
+
*/
|
|
107
|
+
appendWorkflowMemoryChunk(requestParameters: AppendWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Creates request options for editWorkflowMemoryChunk without sending the request
|
|
111
|
+
* @param {string} definitionId
|
|
112
|
+
* @param {string} chunkId
|
|
113
|
+
* @param {EditMemoryChunkRequest} editMemoryChunkRequest
|
|
114
|
+
* @param {string} [authorization]
|
|
115
|
+
* @param {string} [ksUat]
|
|
116
|
+
* @throws {RequiredError}
|
|
117
|
+
* @memberof WorkflowMemoryApiInterface
|
|
118
|
+
*/
|
|
119
|
+
editWorkflowMemoryChunkRequestOpts(requestParameters: EditWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @summary Edit Workflow Memory Chunk Handler
|
|
124
|
+
* @param {string} definitionId
|
|
125
|
+
* @param {string} chunkId
|
|
126
|
+
* @param {EditMemoryChunkRequest} editMemoryChunkRequest
|
|
127
|
+
* @param {string} [authorization]
|
|
128
|
+
* @param {string} [ksUat]
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
* @memberof WorkflowMemoryApiInterface
|
|
132
|
+
*/
|
|
133
|
+
editWorkflowMemoryChunkRaw(requestParameters: EditWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Edit Workflow Memory Chunk Handler
|
|
137
|
+
*/
|
|
138
|
+
editWorkflowMemoryChunk(requestParameters: EditWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Creates request options for forgetWorkflowMemoryChunk without sending the request
|
|
142
|
+
* @param {string} definitionId
|
|
143
|
+
* @param {string} chunkId
|
|
144
|
+
* @param {string} [authorization]
|
|
145
|
+
* @param {string} [ksUat]
|
|
146
|
+
* @throws {RequiredError}
|
|
147
|
+
* @memberof WorkflowMemoryApiInterface
|
|
148
|
+
*/
|
|
149
|
+
forgetWorkflowMemoryChunkRequestOpts(requestParameters: ForgetWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @summary Forget Workflow Memory Chunk Handler
|
|
154
|
+
* @param {string} definitionId
|
|
155
|
+
* @param {string} chunkId
|
|
156
|
+
* @param {string} [authorization]
|
|
157
|
+
* @param {string} [ksUat]
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
* @memberof WorkflowMemoryApiInterface
|
|
161
|
+
*/
|
|
162
|
+
forgetWorkflowMemoryChunkRaw(requestParameters: ForgetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Forget Workflow Memory Chunk Handler
|
|
166
|
+
*/
|
|
167
|
+
forgetWorkflowMemoryChunk(requestParameters: ForgetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Creates request options for getWorkflowMemoryChunk without sending the request
|
|
171
|
+
* @param {string} definitionId
|
|
172
|
+
* @param {string} chunkId
|
|
173
|
+
* @param {string} [authorization]
|
|
174
|
+
* @param {string} [ksUat]
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
* @memberof WorkflowMemoryApiInterface
|
|
177
|
+
*/
|
|
178
|
+
getWorkflowMemoryChunkRequestOpts(requestParameters: GetWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
*
|
|
182
|
+
* @summary Get Workflow Memory Chunk Handler
|
|
183
|
+
* @param {string} definitionId
|
|
184
|
+
* @param {string} chunkId
|
|
185
|
+
* @param {string} [authorization]
|
|
186
|
+
* @param {string} [ksUat]
|
|
187
|
+
* @param {*} [options] Override http request option.
|
|
188
|
+
* @throws {RequiredError}
|
|
189
|
+
* @memberof WorkflowMemoryApiInterface
|
|
190
|
+
*/
|
|
191
|
+
getWorkflowMemoryChunkRaw(requestParameters: GetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>>;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get Workflow Memory Chunk Handler
|
|
195
|
+
*/
|
|
196
|
+
getWorkflowMemoryChunk(requestParameters: GetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Creates request options for listWorkflowMemoryChunks without sending the request
|
|
200
|
+
* @param {string} definitionId
|
|
201
|
+
* @param {string} [authorization]
|
|
202
|
+
* @param {string} [ksUat]
|
|
203
|
+
* @throws {RequiredError}
|
|
204
|
+
* @memberof WorkflowMemoryApiInterface
|
|
205
|
+
*/
|
|
206
|
+
listWorkflowMemoryChunksRequestOpts(requestParameters: ListWorkflowMemoryChunksRequest): Promise<runtime.RequestOpts>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @summary List Workflow Memory Chunks Handler
|
|
211
|
+
* @param {string} definitionId
|
|
212
|
+
* @param {string} [authorization]
|
|
213
|
+
* @param {string} [ksUat]
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
* @memberof WorkflowMemoryApiInterface
|
|
217
|
+
*/
|
|
218
|
+
listWorkflowMemoryChunksRaw(requestParameters: ListWorkflowMemoryChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListMemoryChunksResponse>>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* List Workflow Memory Chunks Handler
|
|
222
|
+
*/
|
|
223
|
+
listWorkflowMemoryChunks(requestParameters: ListWorkflowMemoryChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListMemoryChunksResponse>;
|
|
224
|
+
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
export class WorkflowMemoryApi extends runtime.BaseAPI implements WorkflowMemoryApiInterface {
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Creates request options for appendWorkflowMemoryChunk without sending the request
|
|
234
|
+
*/
|
|
235
|
+
async appendWorkflowMemoryChunkRequestOpts(requestParameters: AppendWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts> {
|
|
236
|
+
if (requestParameters['definitionId'] == null) {
|
|
237
|
+
throw new runtime.RequiredError(
|
|
238
|
+
'definitionId',
|
|
239
|
+
'Required parameter "definitionId" was null or undefined when calling appendWorkflowMemoryChunk().'
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
if (requestParameters['appendMemoryChunkRequest'] == null) {
|
|
244
|
+
throw new runtime.RequiredError(
|
|
245
|
+
'appendMemoryChunkRequest',
|
|
246
|
+
'Required parameter "appendMemoryChunkRequest" was null or undefined when calling appendWorkflowMemoryChunk().'
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const queryParameters: any = {};
|
|
251
|
+
|
|
252
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
253
|
+
|
|
254
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
255
|
+
|
|
256
|
+
if (requestParameters['authorization'] != null) {
|
|
257
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks`;
|
|
262
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
263
|
+
|
|
264
|
+
return {
|
|
265
|
+
path: urlPath,
|
|
266
|
+
method: 'POST',
|
|
267
|
+
headers: headerParameters,
|
|
268
|
+
query: queryParameters,
|
|
269
|
+
body: AppendMemoryChunkRequestToJSON(requestParameters['appendMemoryChunkRequest']),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
275
|
+
* Append Workflow Memory Chunk Handler
|
|
276
|
+
*/
|
|
277
|
+
async appendWorkflowMemoryChunkRaw(requestParameters: AppendWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>> {
|
|
278
|
+
const requestOptions = await this.appendWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
279
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
280
|
+
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
286
|
+
* Append Workflow Memory Chunk Handler
|
|
287
|
+
*/
|
|
288
|
+
async appendWorkflowMemoryChunk(requestParameters: AppendWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse> {
|
|
289
|
+
const response = await this.appendWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
290
|
+
return await response.value();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Creates request options for editWorkflowMemoryChunk without sending the request
|
|
295
|
+
*/
|
|
296
|
+
async editWorkflowMemoryChunkRequestOpts(requestParameters: EditWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts> {
|
|
297
|
+
if (requestParameters['definitionId'] == null) {
|
|
298
|
+
throw new runtime.RequiredError(
|
|
299
|
+
'definitionId',
|
|
300
|
+
'Required parameter "definitionId" was null or undefined when calling editWorkflowMemoryChunk().'
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (requestParameters['chunkId'] == null) {
|
|
305
|
+
throw new runtime.RequiredError(
|
|
306
|
+
'chunkId',
|
|
307
|
+
'Required parameter "chunkId" was null or undefined when calling editWorkflowMemoryChunk().'
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (requestParameters['editMemoryChunkRequest'] == null) {
|
|
312
|
+
throw new runtime.RequiredError(
|
|
313
|
+
'editMemoryChunkRequest',
|
|
314
|
+
'Required parameter "editMemoryChunkRequest" was null or undefined when calling editWorkflowMemoryChunk().'
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const queryParameters: any = {};
|
|
319
|
+
|
|
320
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
321
|
+
|
|
322
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
323
|
+
|
|
324
|
+
if (requestParameters['authorization'] != null) {
|
|
325
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
330
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
331
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
332
|
+
|
|
333
|
+
return {
|
|
334
|
+
path: urlPath,
|
|
335
|
+
method: 'PATCH',
|
|
336
|
+
headers: headerParameters,
|
|
337
|
+
query: queryParameters,
|
|
338
|
+
body: EditMemoryChunkRequestToJSON(requestParameters['editMemoryChunkRequest']),
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Edit Workflow Memory Chunk Handler
|
|
344
|
+
*/
|
|
345
|
+
async editWorkflowMemoryChunkRaw(requestParameters: EditWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>> {
|
|
346
|
+
const requestOptions = await this.editWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
347
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
348
|
+
|
|
349
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Edit Workflow Memory Chunk Handler
|
|
354
|
+
*/
|
|
355
|
+
async editWorkflowMemoryChunk(requestParameters: EditWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse> {
|
|
356
|
+
const response = await this.editWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
357
|
+
return await response.value();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Creates request options for forgetWorkflowMemoryChunk without sending the request
|
|
362
|
+
*/
|
|
363
|
+
async forgetWorkflowMemoryChunkRequestOpts(requestParameters: ForgetWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts> {
|
|
364
|
+
if (requestParameters['definitionId'] == null) {
|
|
365
|
+
throw new runtime.RequiredError(
|
|
366
|
+
'definitionId',
|
|
367
|
+
'Required parameter "definitionId" was null or undefined when calling forgetWorkflowMemoryChunk().'
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if (requestParameters['chunkId'] == null) {
|
|
372
|
+
throw new runtime.RequiredError(
|
|
373
|
+
'chunkId',
|
|
374
|
+
'Required parameter "chunkId" was null or undefined when calling forgetWorkflowMemoryChunk().'
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const queryParameters: any = {};
|
|
379
|
+
|
|
380
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
381
|
+
|
|
382
|
+
if (requestParameters['authorization'] != null) {
|
|
383
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
388
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
389
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
390
|
+
|
|
391
|
+
return {
|
|
392
|
+
path: urlPath,
|
|
393
|
+
method: 'DELETE',
|
|
394
|
+
headers: headerParameters,
|
|
395
|
+
query: queryParameters,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Forget Workflow Memory Chunk Handler
|
|
401
|
+
*/
|
|
402
|
+
async forgetWorkflowMemoryChunkRaw(requestParameters: ForgetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
403
|
+
const requestOptions = await this.forgetWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
404
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
405
|
+
|
|
406
|
+
return new runtime.VoidApiResponse(response);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Forget Workflow Memory Chunk Handler
|
|
411
|
+
*/
|
|
412
|
+
async forgetWorkflowMemoryChunk(requestParameters: ForgetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
413
|
+
await this.forgetWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Creates request options for getWorkflowMemoryChunk without sending the request
|
|
418
|
+
*/
|
|
419
|
+
async getWorkflowMemoryChunkRequestOpts(requestParameters: GetWorkflowMemoryChunkRequest): Promise<runtime.RequestOpts> {
|
|
420
|
+
if (requestParameters['definitionId'] == null) {
|
|
421
|
+
throw new runtime.RequiredError(
|
|
422
|
+
'definitionId',
|
|
423
|
+
'Required parameter "definitionId" was null or undefined when calling getWorkflowMemoryChunk().'
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (requestParameters['chunkId'] == null) {
|
|
428
|
+
throw new runtime.RequiredError(
|
|
429
|
+
'chunkId',
|
|
430
|
+
'Required parameter "chunkId" was null or undefined when calling getWorkflowMemoryChunk().'
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const queryParameters: any = {};
|
|
435
|
+
|
|
436
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
437
|
+
|
|
438
|
+
if (requestParameters['authorization'] != null) {
|
|
439
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
444
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
445
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
446
|
+
|
|
447
|
+
return {
|
|
448
|
+
path: urlPath,
|
|
449
|
+
method: 'GET',
|
|
450
|
+
headers: headerParameters,
|
|
451
|
+
query: queryParameters,
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Get Workflow Memory Chunk Handler
|
|
457
|
+
*/
|
|
458
|
+
async getWorkflowMemoryChunkRaw(requestParameters: GetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryChunkResponse>> {
|
|
459
|
+
const requestOptions = await this.getWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
460
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
461
|
+
|
|
462
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Get Workflow Memory Chunk Handler
|
|
467
|
+
*/
|
|
468
|
+
async getWorkflowMemoryChunk(requestParameters: GetWorkflowMemoryChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MemoryChunkResponse> {
|
|
469
|
+
const response = await this.getWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
470
|
+
return await response.value();
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Creates request options for listWorkflowMemoryChunks without sending the request
|
|
475
|
+
*/
|
|
476
|
+
async listWorkflowMemoryChunksRequestOpts(requestParameters: ListWorkflowMemoryChunksRequest): Promise<runtime.RequestOpts> {
|
|
477
|
+
if (requestParameters['definitionId'] == null) {
|
|
478
|
+
throw new runtime.RequiredError(
|
|
479
|
+
'definitionId',
|
|
480
|
+
'Required parameter "definitionId" was null or undefined when calling listWorkflowMemoryChunks().'
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
const queryParameters: any = {};
|
|
485
|
+
|
|
486
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
487
|
+
|
|
488
|
+
if (requestParameters['authorization'] != null) {
|
|
489
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory`;
|
|
494
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
495
|
+
|
|
496
|
+
return {
|
|
497
|
+
path: urlPath,
|
|
498
|
+
method: 'GET',
|
|
499
|
+
headers: headerParameters,
|
|
500
|
+
query: queryParameters,
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* List Workflow Memory Chunks Handler
|
|
506
|
+
*/
|
|
507
|
+
async listWorkflowMemoryChunksRaw(requestParameters: ListWorkflowMemoryChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListMemoryChunksResponse>> {
|
|
508
|
+
const requestOptions = await this.listWorkflowMemoryChunksRequestOpts(requestParameters);
|
|
509
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
510
|
+
|
|
511
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListMemoryChunksResponseFromJSON(jsonValue));
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* List Workflow Memory Chunks Handler
|
|
516
|
+
*/
|
|
517
|
+
async listWorkflowMemoryChunks(requestParameters: ListWorkflowMemoryChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListMemoryChunksResponse> {
|
|
518
|
+
const response = await this.listWorkflowMemoryChunksRaw(requestParameters, initOverrides);
|
|
519
|
+
return await response.value();
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
}
|