@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
package/docs/PathPartsApi.md
CHANGED
|
@@ -4,16 +4,95 @@ All URIs are relative to *http://localhost:8000*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**appendPathPartEvent**](PathPartsApi.md#appendpathpartevent) | **POST** /v1/path-parts/{path_part_id}/events | Append Path Part Event Handler |
|
|
7
8
|
| [**bulkRemovePathPartTags**](PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler |
|
|
8
9
|
| [**getPathPart**](PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler |
|
|
9
10
|
| [**getPathPartAncestry**](PathPartsApi.md#getpathpartancestry) | **GET** /v1/path-parts/{path_part_id}/ancestry | Get Path Part Ancestry Handler |
|
|
10
11
|
| [**getPathPartSubtreeChunks**](PathPartsApi.md#getpathpartsubtreechunks) | **GET** /v1/path-parts/{path_part_id}/subtree_chunks | Get Path Part Subtree Chunks Handler |
|
|
11
12
|
| [**getPathPartTags**](PathPartsApi.md#getpathparttags) | **GET** /v1/path-parts/{path_part_id}/tags | Get Path Part Tags Handler |
|
|
13
|
+
| [**listPathPartEvents**](PathPartsApi.md#listpathpartevents) | **GET** /v1/path-parts/{path_part_id}/events | List Path Part Events Handler |
|
|
12
14
|
| [**listPathParts**](PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler |
|
|
13
15
|
| [**setPathPartTags**](PathPartsApi.md#setpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Set Path Part Tags Handler |
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
|
|
19
|
+
## appendPathPartEvent
|
|
20
|
+
|
|
21
|
+
> EventResponse appendPathPartEvent(pathPartId, appendEventRequest, authorization, ksUat)
|
|
22
|
+
|
|
23
|
+
Append Path Part Event Handler
|
|
24
|
+
|
|
25
|
+
Record an event for a subject path_part from the frontend. Auth: caller must hold ``can_write`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Server stamps ``actor_user_id`` from the caller\'s identity — callers cannot impersonate other users on the audit trail. ``kind`` is free-form text but reserved server namespaces (``workflow.``, ``document.``, ``folder.``, ``permission.``, ``connector.``, ``query.``, ``auth.``, ``tenant.``) are rejected at 422 so clients cannot forge server-emitted audit events. Clients should namespace under ``client.*``. ``payload`` is capped at 64KB encoded JSON.
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
Configuration,
|
|
32
|
+
PathPartsApi,
|
|
33
|
+
} from '@knowledge-stack/ksapi';
|
|
34
|
+
import type { AppendPathPartEventRequest } from '@knowledge-stack/ksapi';
|
|
35
|
+
|
|
36
|
+
async function example() {
|
|
37
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
38
|
+
const api = new PathPartsApi();
|
|
39
|
+
|
|
40
|
+
const body = {
|
|
41
|
+
// string
|
|
42
|
+
pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
43
|
+
// AppendEventRequest
|
|
44
|
+
appendEventRequest: ...,
|
|
45
|
+
// string (optional)
|
|
46
|
+
authorization: authorization_example,
|
|
47
|
+
// string (optional)
|
|
48
|
+
ksUat: ksUat_example,
|
|
49
|
+
} satisfies AppendPathPartEventRequest;
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
const data = await api.appendPathPartEvent(body);
|
|
53
|
+
console.log(data);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.error(error);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Run the test
|
|
60
|
+
example().catch(console.error);
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description | Notes |
|
|
67
|
+
|------------- | ------------- | ------------- | -------------|
|
|
68
|
+
| **pathPartId** | `string` | | [Defaults to `undefined`] |
|
|
69
|
+
| **appendEventRequest** | [AppendEventRequest](AppendEventRequest.md) | | |
|
|
70
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
71
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
72
|
+
|
|
73
|
+
### Return type
|
|
74
|
+
|
|
75
|
+
[**EventResponse**](EventResponse.md)
|
|
76
|
+
|
|
77
|
+
### Authorization
|
|
78
|
+
|
|
79
|
+
No authorization required
|
|
80
|
+
|
|
81
|
+
### HTTP request headers
|
|
82
|
+
|
|
83
|
+
- **Content-Type**: `application/json`
|
|
84
|
+
- **Accept**: `application/json`
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### HTTP response details
|
|
88
|
+
| Status code | Description | Response headers |
|
|
89
|
+
|-------------|-------------|------------------|
|
|
90
|
+
| **201** | Successful Response | - |
|
|
91
|
+
| **422** | Validation Error | - |
|
|
92
|
+
|
|
93
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
94
|
+
|
|
95
|
+
|
|
17
96
|
## bulkRemovePathPartTags
|
|
18
97
|
|
|
19
98
|
> PathPartTagsResponse bulkRemovePathPartTags(pathPartId, bulkTagRequest, authorization, ksUat)
|
|
@@ -390,6 +469,98 @@ No authorization required
|
|
|
390
469
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
391
470
|
|
|
392
471
|
|
|
472
|
+
## listPathPartEvents
|
|
473
|
+
|
|
474
|
+
> PaginatedResponseEventResponse listPathPartEvents(pathPartId, kind, since, until, recursive, limit, offset, authorization, ksUat)
|
|
475
|
+
|
|
476
|
+
List Path Part Events Handler
|
|
477
|
+
|
|
478
|
+
List events anchored to a specific path_part subject. Subject permission is enforced via the existing ``PathPermissionService`` — caller must have ``can_read`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Events are ordered newest-first by ``ts`` and paginated. When ``recursive=True``, events on any descendant of the subject are included — useful for \"all events under this folder\" or \"all events under this workflow definition\".
|
|
479
|
+
|
|
480
|
+
### Example
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
import {
|
|
484
|
+
Configuration,
|
|
485
|
+
PathPartsApi,
|
|
486
|
+
} from '@knowledge-stack/ksapi';
|
|
487
|
+
import type { ListPathPartEventsRequest } from '@knowledge-stack/ksapi';
|
|
488
|
+
|
|
489
|
+
async function example() {
|
|
490
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
491
|
+
const api = new PathPartsApi();
|
|
492
|
+
|
|
493
|
+
const body = {
|
|
494
|
+
// string
|
|
495
|
+
pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
496
|
+
// string | Filter to a single event kind (optional)
|
|
497
|
+
kind: kind_example,
|
|
498
|
+
// Date | Only events at or after this timestamp (optional)
|
|
499
|
+
since: 2013-10-20T19:20:30+01:00,
|
|
500
|
+
// Date | Only events strictly before this timestamp (optional)
|
|
501
|
+
until: 2013-10-20T19:20:30+01:00,
|
|
502
|
+
// boolean | Include events from descendant path_parts as well as the subject itself (optional)
|
|
503
|
+
recursive: true,
|
|
504
|
+
// number | Number of items per page (optional)
|
|
505
|
+
limit: 56,
|
|
506
|
+
// number | Number of items to skip (optional)
|
|
507
|
+
offset: 56,
|
|
508
|
+
// string (optional)
|
|
509
|
+
authorization: authorization_example,
|
|
510
|
+
// string (optional)
|
|
511
|
+
ksUat: ksUat_example,
|
|
512
|
+
} satisfies ListPathPartEventsRequest;
|
|
513
|
+
|
|
514
|
+
try {
|
|
515
|
+
const data = await api.listPathPartEvents(body);
|
|
516
|
+
console.log(data);
|
|
517
|
+
} catch (error) {
|
|
518
|
+
console.error(error);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Run the test
|
|
523
|
+
example().catch(console.error);
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### Parameters
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
| Name | Type | Description | Notes |
|
|
530
|
+
|------------- | ------------- | ------------- | -------------|
|
|
531
|
+
| **pathPartId** | `string` | | [Defaults to `undefined`] |
|
|
532
|
+
| **kind** | `string` | Filter to a single event kind | [Optional] [Defaults to `undefined`] |
|
|
533
|
+
| **since** | `Date` | Only events at or after this timestamp | [Optional] [Defaults to `undefined`] |
|
|
534
|
+
| **until** | `Date` | Only events strictly before this timestamp | [Optional] [Defaults to `undefined`] |
|
|
535
|
+
| **recursive** | `boolean` | Include events from descendant path_parts as well as the subject itself | [Optional] [Defaults to `false`] |
|
|
536
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
537
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
538
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
539
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
540
|
+
|
|
541
|
+
### Return type
|
|
542
|
+
|
|
543
|
+
[**PaginatedResponseEventResponse**](PaginatedResponseEventResponse.md)
|
|
544
|
+
|
|
545
|
+
### Authorization
|
|
546
|
+
|
|
547
|
+
No authorization required
|
|
548
|
+
|
|
549
|
+
### HTTP request headers
|
|
550
|
+
|
|
551
|
+
- **Content-Type**: Not defined
|
|
552
|
+
- **Accept**: `application/json`
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
### HTTP response details
|
|
556
|
+
| Status code | Description | Response headers |
|
|
557
|
+
|-------------|-------------|------------------|
|
|
558
|
+
| **200** | Successful Response | - |
|
|
559
|
+
| **422** | Validation Error | - |
|
|
560
|
+
|
|
561
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
562
|
+
|
|
563
|
+
|
|
393
564
|
## listPathParts
|
|
394
565
|
|
|
395
566
|
> PaginatedResponsePathPartResponse listPathParts(parentPathId, maxDepth, sortOrder, limit, offset, authorization, ksUat)
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
# WorkflowMemoryApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**appendWorkflowMemoryChunk**](WorkflowMemoryApi.md#appendworkflowmemorychunk) | **POST** /v1/workflow-definitions/{definition_id}/memory/chunks | Append Workflow Memory Chunk Handler |
|
|
8
|
+
| [**editWorkflowMemoryChunk**](WorkflowMemoryApi.md#editworkflowmemorychunk) | **PATCH** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Edit Workflow Memory Chunk Handler |
|
|
9
|
+
| [**forgetWorkflowMemoryChunk**](WorkflowMemoryApi.md#forgetworkflowmemorychunk) | **DELETE** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Forget Workflow Memory Chunk Handler |
|
|
10
|
+
| [**getWorkflowMemoryChunk**](WorkflowMemoryApi.md#getworkflowmemorychunk) | **GET** /v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id} | Get Workflow Memory Chunk Handler |
|
|
11
|
+
| [**listWorkflowMemoryChunks**](WorkflowMemoryApi.md#listworkflowmemorychunks) | **GET** /v1/workflow-definitions/{definition_id}/memory | List Workflow Memory Chunks Handler |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## appendWorkflowMemoryChunk
|
|
16
|
+
|
|
17
|
+
> MemoryChunkResponse appendWorkflowMemoryChunk(definitionId, appendMemoryChunkRequest, authorization, ksUat)
|
|
18
|
+
|
|
19
|
+
Append Workflow Memory Chunk Handler
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import {
|
|
27
|
+
Configuration,
|
|
28
|
+
WorkflowMemoryApi,
|
|
29
|
+
} from '@knowledge-stack/ksapi';
|
|
30
|
+
import type { AppendWorkflowMemoryChunkRequest } from '@knowledge-stack/ksapi';
|
|
31
|
+
|
|
32
|
+
async function example() {
|
|
33
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
34
|
+
const api = new WorkflowMemoryApi();
|
|
35
|
+
|
|
36
|
+
const body = {
|
|
37
|
+
// string
|
|
38
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
39
|
+
// AppendMemoryChunkRequest
|
|
40
|
+
appendMemoryChunkRequest: ...,
|
|
41
|
+
// string (optional)
|
|
42
|
+
authorization: authorization_example,
|
|
43
|
+
// string (optional)
|
|
44
|
+
ksUat: ksUat_example,
|
|
45
|
+
} satisfies AppendWorkflowMemoryChunkRequest;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const data = await api.appendWorkflowMemoryChunk(body);
|
|
49
|
+
console.log(data);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.error(error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Run the test
|
|
56
|
+
example().catch(console.error);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Parameters
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
|------------- | ------------- | ------------- | -------------|
|
|
64
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
65
|
+
| **appendMemoryChunkRequest** | [AppendMemoryChunkRequest](AppendMemoryChunkRequest.md) | | |
|
|
66
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
67
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
68
|
+
|
|
69
|
+
### Return type
|
|
70
|
+
|
|
71
|
+
[**MemoryChunkResponse**](MemoryChunkResponse.md)
|
|
72
|
+
|
|
73
|
+
### Authorization
|
|
74
|
+
|
|
75
|
+
No authorization required
|
|
76
|
+
|
|
77
|
+
### HTTP request headers
|
|
78
|
+
|
|
79
|
+
- **Content-Type**: `application/json`
|
|
80
|
+
- **Accept**: `application/json`
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### HTTP response details
|
|
84
|
+
| Status code | Description | Response headers |
|
|
85
|
+
|-------------|-------------|------------------|
|
|
86
|
+
| **201** | Successful Response | - |
|
|
87
|
+
| **422** | Validation Error | - |
|
|
88
|
+
|
|
89
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## editWorkflowMemoryChunk
|
|
93
|
+
|
|
94
|
+
> MemoryChunkResponse editWorkflowMemoryChunk(definitionId, chunkId, editMemoryChunkRequest, authorization, ksUat)
|
|
95
|
+
|
|
96
|
+
Edit Workflow Memory Chunk Handler
|
|
97
|
+
|
|
98
|
+
### Example
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import {
|
|
102
|
+
Configuration,
|
|
103
|
+
WorkflowMemoryApi,
|
|
104
|
+
} from '@knowledge-stack/ksapi';
|
|
105
|
+
import type { EditWorkflowMemoryChunkRequest } from '@knowledge-stack/ksapi';
|
|
106
|
+
|
|
107
|
+
async function example() {
|
|
108
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
109
|
+
const api = new WorkflowMemoryApi();
|
|
110
|
+
|
|
111
|
+
const body = {
|
|
112
|
+
// string
|
|
113
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
114
|
+
// string
|
|
115
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
116
|
+
// EditMemoryChunkRequest
|
|
117
|
+
editMemoryChunkRequest: ...,
|
|
118
|
+
// string (optional)
|
|
119
|
+
authorization: authorization_example,
|
|
120
|
+
// string (optional)
|
|
121
|
+
ksUat: ksUat_example,
|
|
122
|
+
} satisfies EditWorkflowMemoryChunkRequest;
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
const data = await api.editWorkflowMemoryChunk(body);
|
|
126
|
+
console.log(data);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
console.error(error);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Run the test
|
|
133
|
+
example().catch(console.error);
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
| Name | Type | Description | Notes |
|
|
140
|
+
|------------- | ------------- | ------------- | -------------|
|
|
141
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
142
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
143
|
+
| **editMemoryChunkRequest** | [EditMemoryChunkRequest](EditMemoryChunkRequest.md) | | |
|
|
144
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
145
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**MemoryChunkResponse**](MemoryChunkResponse.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
No authorization required
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: `application/json`
|
|
158
|
+
- **Accept**: `application/json`
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### HTTP response details
|
|
162
|
+
| Status code | Description | Response headers |
|
|
163
|
+
|-------------|-------------|------------------|
|
|
164
|
+
| **200** | Successful Response | - |
|
|
165
|
+
| **422** | Validation Error | - |
|
|
166
|
+
|
|
167
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## forgetWorkflowMemoryChunk
|
|
171
|
+
|
|
172
|
+
> forgetWorkflowMemoryChunk(definitionId, chunkId, authorization, ksUat)
|
|
173
|
+
|
|
174
|
+
Forget Workflow Memory Chunk Handler
|
|
175
|
+
|
|
176
|
+
### Example
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
import {
|
|
180
|
+
Configuration,
|
|
181
|
+
WorkflowMemoryApi,
|
|
182
|
+
} from '@knowledge-stack/ksapi';
|
|
183
|
+
import type { ForgetWorkflowMemoryChunkRequest } from '@knowledge-stack/ksapi';
|
|
184
|
+
|
|
185
|
+
async function example() {
|
|
186
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
187
|
+
const api = new WorkflowMemoryApi();
|
|
188
|
+
|
|
189
|
+
const body = {
|
|
190
|
+
// string
|
|
191
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
192
|
+
// string
|
|
193
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
194
|
+
// string (optional)
|
|
195
|
+
authorization: authorization_example,
|
|
196
|
+
// string (optional)
|
|
197
|
+
ksUat: ksUat_example,
|
|
198
|
+
} satisfies ForgetWorkflowMemoryChunkRequest;
|
|
199
|
+
|
|
200
|
+
try {
|
|
201
|
+
const data = await api.forgetWorkflowMemoryChunk(body);
|
|
202
|
+
console.log(data);
|
|
203
|
+
} catch (error) {
|
|
204
|
+
console.error(error);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Run the test
|
|
209
|
+
example().catch(console.error);
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Parameters
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description | Notes |
|
|
216
|
+
|------------- | ------------- | ------------- | -------------|
|
|
217
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
218
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
219
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
220
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
`void` (Empty response body)
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
No authorization required
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: Not defined
|
|
233
|
+
- **Accept**: `application/json`
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
### HTTP response details
|
|
237
|
+
| Status code | Description | Response headers |
|
|
238
|
+
|-------------|-------------|------------------|
|
|
239
|
+
| **204** | Successful Response | - |
|
|
240
|
+
| **422** | Validation Error | - |
|
|
241
|
+
|
|
242
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
## getWorkflowMemoryChunk
|
|
246
|
+
|
|
247
|
+
> MemoryChunkResponse getWorkflowMemoryChunk(definitionId, chunkId, authorization, ksUat)
|
|
248
|
+
|
|
249
|
+
Get Workflow Memory Chunk Handler
|
|
250
|
+
|
|
251
|
+
### Example
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
import {
|
|
255
|
+
Configuration,
|
|
256
|
+
WorkflowMemoryApi,
|
|
257
|
+
} from '@knowledge-stack/ksapi';
|
|
258
|
+
import type { GetWorkflowMemoryChunkRequest } from '@knowledge-stack/ksapi';
|
|
259
|
+
|
|
260
|
+
async function example() {
|
|
261
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
262
|
+
const api = new WorkflowMemoryApi();
|
|
263
|
+
|
|
264
|
+
const body = {
|
|
265
|
+
// string
|
|
266
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
267
|
+
// string
|
|
268
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
269
|
+
// string (optional)
|
|
270
|
+
authorization: authorization_example,
|
|
271
|
+
// string (optional)
|
|
272
|
+
ksUat: ksUat_example,
|
|
273
|
+
} satisfies GetWorkflowMemoryChunkRequest;
|
|
274
|
+
|
|
275
|
+
try {
|
|
276
|
+
const data = await api.getWorkflowMemoryChunk(body);
|
|
277
|
+
console.log(data);
|
|
278
|
+
} catch (error) {
|
|
279
|
+
console.error(error);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Run the test
|
|
284
|
+
example().catch(console.error);
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Parameters
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
| Name | Type | Description | Notes |
|
|
291
|
+
|------------- | ------------- | ------------- | -------------|
|
|
292
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
293
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
294
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
295
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
296
|
+
|
|
297
|
+
### Return type
|
|
298
|
+
|
|
299
|
+
[**MemoryChunkResponse**](MemoryChunkResponse.md)
|
|
300
|
+
|
|
301
|
+
### Authorization
|
|
302
|
+
|
|
303
|
+
No authorization required
|
|
304
|
+
|
|
305
|
+
### HTTP request headers
|
|
306
|
+
|
|
307
|
+
- **Content-Type**: Not defined
|
|
308
|
+
- **Accept**: `application/json`
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### HTTP response details
|
|
312
|
+
| Status code | Description | Response headers |
|
|
313
|
+
|-------------|-------------|------------------|
|
|
314
|
+
| **200** | Successful Response | - |
|
|
315
|
+
| **422** | Validation Error | - |
|
|
316
|
+
|
|
317
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
## listWorkflowMemoryChunks
|
|
321
|
+
|
|
322
|
+
> ListMemoryChunksResponse listWorkflowMemoryChunks(definitionId, authorization, ksUat)
|
|
323
|
+
|
|
324
|
+
List Workflow Memory Chunks Handler
|
|
325
|
+
|
|
326
|
+
### Example
|
|
327
|
+
|
|
328
|
+
```ts
|
|
329
|
+
import {
|
|
330
|
+
Configuration,
|
|
331
|
+
WorkflowMemoryApi,
|
|
332
|
+
} from '@knowledge-stack/ksapi';
|
|
333
|
+
import type { ListWorkflowMemoryChunksRequest } from '@knowledge-stack/ksapi';
|
|
334
|
+
|
|
335
|
+
async function example() {
|
|
336
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
337
|
+
const api = new WorkflowMemoryApi();
|
|
338
|
+
|
|
339
|
+
const body = {
|
|
340
|
+
// string
|
|
341
|
+
definitionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
342
|
+
// string (optional)
|
|
343
|
+
authorization: authorization_example,
|
|
344
|
+
// string (optional)
|
|
345
|
+
ksUat: ksUat_example,
|
|
346
|
+
} satisfies ListWorkflowMemoryChunksRequest;
|
|
347
|
+
|
|
348
|
+
try {
|
|
349
|
+
const data = await api.listWorkflowMemoryChunks(body);
|
|
350
|
+
console.log(data);
|
|
351
|
+
} catch (error) {
|
|
352
|
+
console.error(error);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// Run the test
|
|
357
|
+
example().catch(console.error);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Parameters
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
| Name | Type | Description | Notes |
|
|
364
|
+
|------------- | ------------- | ------------- | -------------|
|
|
365
|
+
| **definitionId** | `string` | | [Defaults to `undefined`] |
|
|
366
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
367
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
368
|
+
|
|
369
|
+
### Return type
|
|
370
|
+
|
|
371
|
+
[**ListMemoryChunksResponse**](ListMemoryChunksResponse.md)
|
|
372
|
+
|
|
373
|
+
### Authorization
|
|
374
|
+
|
|
375
|
+
No authorization required
|
|
376
|
+
|
|
377
|
+
### HTTP request headers
|
|
378
|
+
|
|
379
|
+
- **Content-Type**: Not defined
|
|
380
|
+
- **Accept**: `application/json`
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
### HTTP response details
|
|
384
|
+
| Status code | Description | Response headers |
|
|
385
|
+
|-------------|-------------|------------------|
|
|
386
|
+
| **200** | Successful Response | - |
|
|
387
|
+
| **422** | Validation Error | - |
|
|
388
|
+
|
|
389
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
390
|
+
|