@knowledge-stack/ksapi 1.83.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 +18 -0
- package/README.md +17 -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/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/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 +1 -1
- 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/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 +1 -1
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -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 +1 -1
- 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/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 +1 -1
- package/dist/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/AppendEventRequest.md +37 -0
- package/docs/AppendMemoryChunkRequest.md +36 -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/PathPartsApi.md +171 -0
- package/docs/WorkflowMemoryApi.md +390 -0
- package/package.json +1 -1
- package/src/apis/PathPartsApi.ts +234 -0
- package/src/apis/WorkflowMemoryApi.ts +522 -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 +1 -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/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 +1 -1
- package/src/models/WorkflowDefinitionResponse.ts +1 -1
- package/src/models/WorkflowRunSnapshot.ts +1 -1
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,262 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { AppendMemoryChunkRequestToJSON, EditMemoryChunkRequestToJSON, ListMemoryChunksResponseFromJSON, MemoryChunkResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class WorkflowMemoryApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for appendWorkflowMemoryChunk without sending the request
|
|
31
|
+
*/
|
|
32
|
+
appendWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['definitionId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling appendWorkflowMemoryChunk().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['appendMemoryChunkRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('appendMemoryChunkRequest', 'Required parameter "appendMemoryChunkRequest" was null or undefined when calling appendWorkflowMemoryChunk().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
if (requestParameters['authorization'] != null) {
|
|
44
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
45
|
+
}
|
|
46
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks`;
|
|
47
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
48
|
+
return {
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: AppendMemoryChunkRequestToJSON(requestParameters['appendMemoryChunkRequest']),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
* Append Workflow Memory Chunk Handler
|
|
60
|
+
*/
|
|
61
|
+
appendWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = yield this.appendWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
64
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
65
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
* Append Workflow Memory Chunk Handler
|
|
71
|
+
*/
|
|
72
|
+
appendWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const response = yield this.appendWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
75
|
+
return yield response.value();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for editWorkflowMemoryChunk without sending the request
|
|
80
|
+
*/
|
|
81
|
+
editWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters['definitionId'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
85
|
+
}
|
|
86
|
+
if (requestParameters['chunkId'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
88
|
+
}
|
|
89
|
+
if (requestParameters['editMemoryChunkRequest'] == null) {
|
|
90
|
+
throw new runtime.RequiredError('editMemoryChunkRequest', 'Required parameter "editMemoryChunkRequest" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
91
|
+
}
|
|
92
|
+
const queryParameters = {};
|
|
93
|
+
const headerParameters = {};
|
|
94
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
95
|
+
if (requestParameters['authorization'] != null) {
|
|
96
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
97
|
+
}
|
|
98
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
99
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
100
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
101
|
+
return {
|
|
102
|
+
path: urlPath,
|
|
103
|
+
method: 'PATCH',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
body: EditMemoryChunkRequestToJSON(requestParameters['editMemoryChunkRequest']),
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Edit Workflow Memory Chunk Handler
|
|
112
|
+
*/
|
|
113
|
+
editWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const requestOptions = yield this.editWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
116
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
117
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Edit Workflow Memory Chunk Handler
|
|
122
|
+
*/
|
|
123
|
+
editWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const response = yield this.editWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
126
|
+
return yield response.value();
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Creates request options for forgetWorkflowMemoryChunk without sending the request
|
|
131
|
+
*/
|
|
132
|
+
forgetWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
if (requestParameters['definitionId'] == null) {
|
|
135
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling forgetWorkflowMemoryChunk().');
|
|
136
|
+
}
|
|
137
|
+
if (requestParameters['chunkId'] == null) {
|
|
138
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling forgetWorkflowMemoryChunk().');
|
|
139
|
+
}
|
|
140
|
+
const queryParameters = {};
|
|
141
|
+
const headerParameters = {};
|
|
142
|
+
if (requestParameters['authorization'] != null) {
|
|
143
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
144
|
+
}
|
|
145
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
146
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
147
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
148
|
+
return {
|
|
149
|
+
path: urlPath,
|
|
150
|
+
method: 'DELETE',
|
|
151
|
+
headers: headerParameters,
|
|
152
|
+
query: queryParameters,
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Forget Workflow Memory Chunk Handler
|
|
158
|
+
*/
|
|
159
|
+
forgetWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const requestOptions = yield this.forgetWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
162
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
163
|
+
return new runtime.VoidApiResponse(response);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Forget Workflow Memory Chunk Handler
|
|
168
|
+
*/
|
|
169
|
+
forgetWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
yield this.forgetWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Creates request options for getWorkflowMemoryChunk without sending the request
|
|
176
|
+
*/
|
|
177
|
+
getWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
if (requestParameters['definitionId'] == null) {
|
|
180
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling getWorkflowMemoryChunk().');
|
|
181
|
+
}
|
|
182
|
+
if (requestParameters['chunkId'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getWorkflowMemoryChunk().');
|
|
184
|
+
}
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
const headerParameters = {};
|
|
187
|
+
if (requestParameters['authorization'] != null) {
|
|
188
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
189
|
+
}
|
|
190
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
191
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
192
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
193
|
+
return {
|
|
194
|
+
path: urlPath,
|
|
195
|
+
method: 'GET',
|
|
196
|
+
headers: headerParameters,
|
|
197
|
+
query: queryParameters,
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get Workflow Memory Chunk Handler
|
|
203
|
+
*/
|
|
204
|
+
getWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
const requestOptions = yield this.getWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
207
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
208
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MemoryChunkResponseFromJSON(jsonValue));
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Get Workflow Memory Chunk Handler
|
|
213
|
+
*/
|
|
214
|
+
getWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
const response = yield this.getWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
217
|
+
return yield response.value();
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Creates request options for listWorkflowMemoryChunks without sending the request
|
|
222
|
+
*/
|
|
223
|
+
listWorkflowMemoryChunksRequestOpts(requestParameters) {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
if (requestParameters['definitionId'] == null) {
|
|
226
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling listWorkflowMemoryChunks().');
|
|
227
|
+
}
|
|
228
|
+
const queryParameters = {};
|
|
229
|
+
const headerParameters = {};
|
|
230
|
+
if (requestParameters['authorization'] != null) {
|
|
231
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
232
|
+
}
|
|
233
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory`;
|
|
234
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
235
|
+
return {
|
|
236
|
+
path: urlPath,
|
|
237
|
+
method: 'GET',
|
|
238
|
+
headers: headerParameters,
|
|
239
|
+
query: queryParameters,
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* List Workflow Memory Chunks Handler
|
|
245
|
+
*/
|
|
246
|
+
listWorkflowMemoryChunksRaw(requestParameters, initOverrides) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const requestOptions = yield this.listWorkflowMemoryChunksRequestOpts(requestParameters);
|
|
249
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
250
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListMemoryChunksResponseFromJSON(jsonValue));
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* List Workflow Memory Chunks Handler
|
|
255
|
+
*/
|
|
256
|
+
listWorkflowMemoryChunks(requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const response = yield this.listWorkflowMemoryChunksRaw(requestParameters, initOverrides);
|
|
259
|
+
return yield response.value();
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Body for ``POST /v1/path-parts/{path_part_id}/events``.
|
|
14
|
+
*
|
|
15
|
+
* The route requires ``can_write`` on the subject path_part. Server
|
|
16
|
+
* stamps ``id``/``tenant_id``/``actor_user_id``/``ts``/
|
|
17
|
+
* ``subject_path_part_id``; frontend supplies only ``kind`` and
|
|
18
|
+
* ``payload``. ``kind`` must NOT use a reserved server namespace —
|
|
19
|
+
* those are emitted by service code so the audit trail can't be
|
|
20
|
+
* forged by an authenticated client.
|
|
21
|
+
* @export
|
|
22
|
+
* @interface AppendEventRequest
|
|
23
|
+
*/
|
|
24
|
+
export interface AppendEventRequest {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AppendEventRequest
|
|
29
|
+
*/
|
|
30
|
+
kind: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {{ [key: string]: any; }}
|
|
34
|
+
* @memberof AppendEventRequest
|
|
35
|
+
*/
|
|
36
|
+
payload?: {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare const AppendEventRequestPropertyValidationAttributesMap: {
|
|
41
|
+
[property: string]: {
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
minLength?: number;
|
|
44
|
+
pattern?: string;
|
|
45
|
+
maximum?: number;
|
|
46
|
+
exclusiveMaximum?: boolean;
|
|
47
|
+
minimum?: number;
|
|
48
|
+
exclusiveMinimum?: boolean;
|
|
49
|
+
multipleOf?: number;
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
minItems?: number;
|
|
52
|
+
uniqueItems?: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the AppendEventRequest interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfAppendEventRequest(value: object): value is AppendEventRequest;
|
|
59
|
+
export declare function AppendEventRequestFromJSON(json: any): AppendEventRequest;
|
|
60
|
+
export declare function AppendEventRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppendEventRequest;
|
|
61
|
+
export declare function AppendEventRequestToJSON(json: any): AppendEventRequest;
|
|
62
|
+
export declare function AppendEventRequestToJSONTyped(value?: AppendEventRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
export const AppendEventRequestPropertyValidationAttributesMap = {
|
|
15
|
+
kind: {
|
|
16
|
+
maxLength: 255,
|
|
17
|
+
minLength: 1,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the AppendEventRequest interface.
|
|
22
|
+
*/
|
|
23
|
+
export function instanceOfAppendEventRequest(value) {
|
|
24
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function AppendEventRequestFromJSON(json) {
|
|
29
|
+
return AppendEventRequestFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function AppendEventRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'kind': json['kind'],
|
|
37
|
+
'payload': json['payload'] == null ? undefined : json['payload'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export function AppendEventRequestToJSON(json) {
|
|
41
|
+
return AppendEventRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
export function AppendEventRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'kind': value['kind'],
|
|
49
|
+
'payload': value['payload'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
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 { MemoryKind } from './MemoryKind';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AppendMemoryChunkRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface AppendMemoryChunkRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AppendMemoryChunkRequest
|
|
23
|
+
*/
|
|
24
|
+
body: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {MemoryKind}
|
|
28
|
+
* @memberof AppendMemoryChunkRequest
|
|
29
|
+
*/
|
|
30
|
+
kind?: MemoryKind;
|
|
31
|
+
}
|
|
32
|
+
export declare const AppendMemoryChunkRequestPropertyValidationAttributesMap: {
|
|
33
|
+
[property: string]: {
|
|
34
|
+
maxLength?: number;
|
|
35
|
+
minLength?: number;
|
|
36
|
+
pattern?: string;
|
|
37
|
+
maximum?: number;
|
|
38
|
+
exclusiveMaximum?: boolean;
|
|
39
|
+
minimum?: number;
|
|
40
|
+
exclusiveMinimum?: boolean;
|
|
41
|
+
multipleOf?: number;
|
|
42
|
+
maxItems?: number;
|
|
43
|
+
minItems?: number;
|
|
44
|
+
uniqueItems?: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the AppendMemoryChunkRequest interface.
|
|
49
|
+
*/
|
|
50
|
+
export declare function instanceOfAppendMemoryChunkRequest(value: object): value is AppendMemoryChunkRequest;
|
|
51
|
+
export declare function AppendMemoryChunkRequestFromJSON(json: any): AppendMemoryChunkRequest;
|
|
52
|
+
export declare function AppendMemoryChunkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppendMemoryChunkRequest;
|
|
53
|
+
export declare function AppendMemoryChunkRequestToJSON(json: any): AppendMemoryChunkRequest;
|
|
54
|
+
export declare function AppendMemoryChunkRequestToJSONTyped(value?: AppendMemoryChunkRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
import { MemoryKindFromJSON, MemoryKindToJSON, } from './MemoryKind';
|
|
15
|
+
export const AppendMemoryChunkRequestPropertyValidationAttributesMap = {
|
|
16
|
+
body: {
|
|
17
|
+
maxLength: 16384,
|
|
18
|
+
minLength: 1,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AppendMemoryChunkRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfAppendMemoryChunkRequest(value) {
|
|
25
|
+
if (!('body' in value) || value['body'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function AppendMemoryChunkRequestFromJSON(json) {
|
|
30
|
+
return AppendMemoryChunkRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function AppendMemoryChunkRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'body': json['body'],
|
|
38
|
+
'kind': json['kind'] == null ? undefined : MemoryKindFromJSON(json['kind']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function AppendMemoryChunkRequestToJSON(json) {
|
|
42
|
+
return AppendMemoryChunkRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function AppendMemoryChunkRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'body': value['body'],
|
|
50
|
+
'kind': MemoryKindToJSON(value['kind']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -116,17 +116,17 @@ export interface ChunkBulkResponse {
|
|
|
116
116
|
*/
|
|
117
117
|
assetS3Urls?: Array<string>;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Ancestor document info (populated when with_document=true)
|
|
120
120
|
* @type {ChunkDocumentResponse}
|
|
121
121
|
* @memberof ChunkBulkResponse
|
|
122
122
|
*/
|
|
123
|
-
document?: ChunkDocumentResponse;
|
|
123
|
+
document?: ChunkDocumentResponse | null;
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* Ancestor document version info (populated when with_document=true)
|
|
126
126
|
* @type {ChunkDocumentVersionResponse}
|
|
127
127
|
* @memberof ChunkBulkResponse
|
|
128
128
|
*/
|
|
129
|
-
documentVersion?: ChunkDocumentVersionResponse;
|
|
129
|
+
documentVersion?: ChunkDocumentVersionResponse | null;
|
|
130
130
|
/**
|
|
131
131
|
* Ordered ancestor PathPart IDs from root to chunk
|
|
132
132
|
* @type {Array<string>}
|
|
@@ -66,11 +66,11 @@ export interface ChunkContentItem {
|
|
|
66
66
|
*/
|
|
67
67
|
chunkType?: ChunkType;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Chunk metadata
|
|
70
70
|
* @type {ChunkMetadata}
|
|
71
71
|
* @memberof ChunkContentItem
|
|
72
72
|
*/
|
|
73
|
-
chunkMetadata?: ChunkMetadata;
|
|
73
|
+
chunkMetadata?: ChunkMetadata | null;
|
|
74
74
|
/**
|
|
75
75
|
* Full materialized path from root
|
|
76
76
|
* @type {string}
|
|
@@ -116,17 +116,17 @@ export interface ChunkResponse {
|
|
|
116
116
|
*/
|
|
117
117
|
assetS3Urls?: Array<string>;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Ancestor document info (populated when with_document=true)
|
|
120
120
|
* @type {ChunkDocumentResponse}
|
|
121
121
|
* @memberof ChunkResponse
|
|
122
122
|
*/
|
|
123
|
-
document?: ChunkDocumentResponse;
|
|
123
|
+
document?: ChunkDocumentResponse | null;
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* Ancestor document version info (populated when with_document=true)
|
|
126
126
|
* @type {ChunkDocumentVersionResponse}
|
|
127
127
|
* @memberof ChunkResponse
|
|
128
128
|
*/
|
|
129
|
-
documentVersion?: ChunkDocumentVersionResponse;
|
|
129
|
+
documentVersion?: ChunkDocumentVersionResponse | null;
|
|
130
130
|
}
|
|
131
131
|
export declare const ChunkResponsePropertyValidationAttributesMap: {
|
|
132
132
|
[property: string]: {
|
|
@@ -37,11 +37,11 @@ export interface CreateThreadMessageRequest {
|
|
|
37
37
|
*/
|
|
38
38
|
content: ThreadMessageContent;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Message details (execution steps). Omit for user messages.
|
|
41
41
|
* @type {ThreadMessageDetailsInput}
|
|
42
42
|
* @memberof CreateThreadMessageRequest
|
|
43
43
|
*/
|
|
44
|
-
details?: ThreadMessageDetailsInput;
|
|
44
|
+
details?: ThreadMessageDetailsInput | null;
|
|
45
45
|
}
|
|
46
46
|
export declare const CreateThreadMessageRequestPropertyValidationAttributesMap: {
|
|
47
47
|
[property: string]: {
|
|
@@ -47,7 +47,7 @@ export interface CreateWorkflowDefinitionRequest {
|
|
|
47
47
|
* @type {SelfHostedRunnerConfig}
|
|
48
48
|
* @memberof CreateWorkflowDefinitionRequest
|
|
49
49
|
*/
|
|
50
|
-
runnerConfig?: SelfHostedRunnerConfig;
|
|
50
|
+
runnerConfig?: SelfHostedRunnerConfig | null;
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
53
|
* @type {number}
|
|
@@ -51,11 +51,11 @@ export interface DocumentVersionMetadata {
|
|
|
51
51
|
*/
|
|
52
52
|
hash?: string | null;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Current state of the ingestion pipeline workflow
|
|
55
55
|
* @type {PipelineState}
|
|
56
56
|
* @memberof DocumentVersionMetadata
|
|
57
57
|
*/
|
|
58
|
-
pipelineState?: PipelineState;
|
|
58
|
+
pipelineState?: PipelineState | null;
|
|
59
59
|
/**
|
|
60
60
|
* Total number of pages in the document
|
|
61
61
|
* @type {number}
|
|
@@ -103,11 +103,11 @@ export interface DocumentVersionMetadata {
|
|
|
103
103
|
[key: string]: any;
|
|
104
104
|
}> | null;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* Aggregate statistics for the document version (tokens, chunk counts, depth)
|
|
107
107
|
* @type {InformationStatistics}
|
|
108
108
|
* @memberof DocumentVersionMetadata
|
|
109
109
|
*/
|
|
110
|
-
informationStatistics?: InformationStatistics;
|
|
110
|
+
informationStatistics?: InformationStatistics | null;
|
|
111
111
|
/**
|
|
112
112
|
* True once the conversion activity successfully consumed PAGE quota
|
|
113
113
|
* @type {boolean}
|
|
@@ -67,7 +67,7 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
67
67
|
* @type {PipelineState}
|
|
68
68
|
* @memberof DocumentVersionMetadataUpdate
|
|
69
69
|
*/
|
|
70
|
-
pipelineState?: PipelineState;
|
|
70
|
+
pipelineState?: PipelineState | null;
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
73
|
* @type {number}
|
|
@@ -119,7 +119,7 @@ export interface DocumentVersionMetadataUpdate {
|
|
|
119
119
|
* @type {InformationStatistics}
|
|
120
120
|
* @memberof DocumentVersionMetadataUpdate
|
|
121
121
|
*/
|
|
122
|
-
informationStatistics?: InformationStatistics;
|
|
122
|
+
informationStatistics?: InformationStatistics | null;
|
|
123
123
|
/**
|
|
124
124
|
*
|
|
125
125
|
* @type {boolean}
|