@knowledge-stack/ksapi 1.23.5 → 1.25.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 +130 -4
- package/.openapi-generator/VERSION +1 -1
- package/README.md +282 -28
- package/dist/apis/AuthApi.d.ts +117 -0
- package/dist/apis/AuthApi.js +137 -47
- package/dist/apis/ChunkLineagesApi.d.ts +38 -0
- package/dist/apis/ChunkLineagesApi.js +42 -15
- package/dist/apis/ChunksApi.d.ts +161 -5
- package/dist/apis/ChunksApi.js +168 -31
- package/dist/apis/DefaultApi.d.ts +20 -0
- package/dist/apis/DefaultApi.js +28 -10
- package/dist/apis/DocumentVersionsApi.d.ts +99 -9
- package/dist/apis/DocumentVersionsApi.js +100 -37
- package/dist/apis/DocumentsApi.d.ts +80 -0
- package/dist/apis/DocumentsApi.js +84 -30
- package/dist/apis/FoldersApi.d.ts +92 -9
- package/dist/apis/FoldersApi.js +86 -32
- package/dist/apis/InvitesApi.d.ts +51 -0
- package/dist/apis/InvitesApi.js +56 -20
- package/dist/apis/PathPartsApi.d.ts +140 -1
- package/dist/apis/PathPartsApi.js +141 -20
- package/dist/apis/SectionsApi.d.ts +49 -0
- package/dist/apis/SectionsApi.js +56 -20
- package/dist/apis/TagsApi.d.ts +62 -0
- package/dist/apis/TagsApi.js +70 -25
- package/dist/apis/TenantsApi.d.ts +103 -0
- package/dist/apis/TenantsApi.js +112 -40
- package/dist/apis/ThreadMessagesApi.d.ts +41 -0
- package/dist/apis/ThreadMessagesApi.js +42 -15
- package/dist/apis/ThreadsApi.d.ts +77 -0
- package/dist/apis/ThreadsApi.js +84 -30
- package/dist/apis/UserPermissionsApi.d.ts +54 -0
- package/dist/apis/UserPermissionsApi.js +56 -20
- package/dist/apis/UsersApi.d.ts +23 -0
- package/dist/apis/UsersApi.js +28 -10
- package/dist/apis/WorkflowsApi.d.ts +38 -0
- package/dist/apis/WorkflowsApi.js +42 -15
- package/dist/esm/apis/AuthApi.d.ts +117 -0
- package/dist/esm/apis/AuthApi.js +137 -47
- package/dist/esm/apis/ChunkLineagesApi.d.ts +38 -0
- package/dist/esm/apis/ChunkLineagesApi.js +42 -15
- package/dist/esm/apis/ChunksApi.d.ts +161 -5
- package/dist/esm/apis/ChunksApi.js +169 -32
- package/dist/esm/apis/DefaultApi.d.ts +20 -0
- package/dist/esm/apis/DefaultApi.js +28 -10
- package/dist/esm/apis/DocumentVersionsApi.d.ts +99 -9
- package/dist/esm/apis/DocumentVersionsApi.js +101 -38
- package/dist/esm/apis/DocumentsApi.d.ts +80 -0
- package/dist/esm/apis/DocumentsApi.js +84 -30
- package/dist/esm/apis/FoldersApi.d.ts +92 -9
- package/dist/esm/apis/FoldersApi.js +87 -33
- package/dist/esm/apis/InvitesApi.d.ts +51 -0
- package/dist/esm/apis/InvitesApi.js +56 -20
- package/dist/esm/apis/PathPartsApi.d.ts +140 -1
- package/dist/esm/apis/PathPartsApi.js +142 -21
- package/dist/esm/apis/SectionsApi.d.ts +49 -0
- package/dist/esm/apis/SectionsApi.js +56 -20
- package/dist/esm/apis/TagsApi.d.ts +62 -0
- package/dist/esm/apis/TagsApi.js +70 -25
- package/dist/esm/apis/TenantsApi.d.ts +103 -0
- package/dist/esm/apis/TenantsApi.js +112 -40
- package/dist/esm/apis/ThreadMessagesApi.d.ts +41 -0
- package/dist/esm/apis/ThreadMessagesApi.js +42 -15
- package/dist/esm/apis/ThreadsApi.d.ts +77 -0
- package/dist/esm/apis/ThreadsApi.js +84 -30
- package/dist/esm/apis/UserPermissionsApi.d.ts +54 -0
- package/dist/esm/apis/UserPermissionsApi.js +56 -20
- package/dist/esm/apis/UsersApi.d.ts +23 -0
- package/dist/esm/apis/UsersApi.js +28 -10
- package/dist/esm/apis/WorkflowsApi.d.ts +38 -0
- package/dist/esm/apis/WorkflowsApi.js +42 -15
- package/dist/esm/models/ChunkBulkResponse.d.ts +139 -0
- package/dist/esm/models/ChunkBulkResponse.js +100 -0
- package/dist/esm/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +19 -16
- package/dist/esm/models/ChunkSearchRequest.d.ts +14 -2
- package/dist/esm/models/ChunkSearchRequest.js +6 -2
- package/dist/esm/models/DocumentResponse.d.ts +13 -0
- package/dist/esm/models/DocumentResponse.js +10 -0
- package/dist/esm/models/FolderResponse.d.ts +13 -0
- package/dist/esm/models/FolderResponse.js +10 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +70 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +70 -0
- package/dist/esm/models/SectionContentItem.d.ts +114 -0
- package/dist/esm/models/SectionContentItem.js +88 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
- package/dist/esm/models/SubtreeChunkGroup.d.ts +62 -0
- package/dist/esm/models/SubtreeChunkGroup.js +52 -0
- package/dist/esm/models/SubtreeChunksResponse.d.ts +48 -0
- package/dist/esm/models/SubtreeChunksResponse.js +45 -0
- package/dist/esm/models/VersionChunkIdsResponse.d.ts +47 -0
- package/dist/esm/models/VersionChunkIdsResponse.js +44 -0
- package/dist/esm/models/index.d.ts +10 -4
- package/dist/esm/models/index.js +10 -4
- package/dist/models/ChunkBulkResponse.d.ts +139 -0
- package/dist/models/ChunkBulkResponse.js +108 -0
- package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +25 -22
- package/dist/models/ChunkSearchRequest.d.ts +14 -2
- package/dist/models/ChunkSearchRequest.js +6 -2
- package/dist/models/DocumentResponse.d.ts +13 -0
- package/dist/models/DocumentResponse.js +11 -1
- package/dist/models/FolderResponse.d.ts +13 -0
- package/dist/models/FolderResponse.js +11 -1
- package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
- package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
- package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +78 -0
- package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
- package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +78 -0
- package/dist/models/SectionContentItem.d.ts +114 -0
- package/dist/models/SectionContentItem.js +96 -0
- package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
- package/dist/models/SubtreeChunkGroup.d.ts +62 -0
- package/dist/models/SubtreeChunkGroup.js +60 -0
- package/dist/models/SubtreeChunksResponse.d.ts +48 -0
- package/dist/models/SubtreeChunksResponse.js +53 -0
- package/dist/models/VersionChunkIdsResponse.d.ts +47 -0
- package/dist/models/VersionChunkIdsResponse.js +52 -0
- package/dist/models/index.d.ts +10 -4
- package/dist/models/index.js +10 -4
- package/docs/AuthApi.md +707 -0
- package/docs/BulkTagRequest.md +35 -0
- package/docs/ChunkBulkResponse.md +65 -0
- package/docs/ChunkContentItem.md +59 -0
- package/docs/ChunkLineageResponse.md +41 -0
- package/docs/ChunkLineagesApi.md +230 -0
- package/docs/ChunkMetadataInput.md +37 -0
- package/docs/ChunkMetadataOutput.md +37 -0
- package/docs/ChunkResponse.md +63 -0
- package/docs/ChunkSearchRequest.md +51 -0
- package/docs/ChunkType.md +33 -0
- package/docs/ChunksApi.md +590 -0
- package/docs/ClearVersionContentsResponse.md +35 -0
- package/docs/CreateChunkLineageRequest.md +37 -0
- package/docs/CreateChunkRequest.md +43 -0
- package/docs/CreateDocumentRequest.md +41 -0
- package/docs/CreateFolderRequest.md +37 -0
- package/docs/CreatePasswordUserRequest.md +36 -0
- package/docs/CreatePermissionRequest.md +40 -0
- package/docs/CreateSectionRequest.md +41 -0
- package/docs/CreateTagRequest.md +39 -0
- package/docs/CreateTenantRequest.md +37 -0
- package/docs/CreateThreadMessageRequest.md +37 -0
- package/docs/CreateThreadRequest.md +37 -0
- package/docs/DefaultApi.md +128 -0
- package/docs/DocumentOrigin.md +33 -0
- package/docs/DocumentResponse.md +63 -0
- package/docs/DocumentType.md +33 -0
- package/docs/DocumentVersionMetadata.md +47 -0
- package/docs/DocumentVersionMetadataUpdate.md +47 -0
- package/docs/DocumentVersionResponse.md +57 -0
- package/docs/DocumentVersionsApi.md +530 -0
- package/docs/DocumentsApi.md +464 -0
- package/docs/EmailSentResponse.md +34 -0
- package/docs/EmailVerificationRequest.md +34 -0
- package/docs/EmbeddingModel.md +33 -0
- package/docs/FolderResponse.md +55 -0
- package/docs/FolderResponseOrDocumentResponse.md +62 -0
- package/docs/FoldersApi.md +473 -0
- package/docs/HTTPValidationError.md +34 -0
- package/docs/HealthCheckResponse.md +36 -0
- package/docs/IdpType.md +33 -0
- package/docs/IngestDocumentResponse.md +39 -0
- package/docs/InviteResponse.md +53 -0
- package/docs/InviteStatus.md +32 -0
- package/docs/InviteUserRequest.md +38 -0
- package/docs/InvitesApi.md +305 -0
- package/docs/LineageEdgeResponse.md +37 -0
- package/docs/LineageGraphResponse.md +37 -0
- package/docs/LineageNodeResponse.md +47 -0
- package/docs/LocationInner.md +32 -0
- package/docs/MessageRole.md +33 -0
- package/docs/OAuth2Config.md +41 -0
- package/docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md +40 -0
- package/docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md +40 -0
- package/docs/PaginatedResponseDocumentResponse.md +40 -0
- package/docs/PaginatedResponseDocumentVersionResponse.md +40 -0
- package/docs/PaginatedResponseFolderResponse.md +40 -0
- package/docs/PaginatedResponseInviteResponse.md +40 -0
- package/docs/PaginatedResponsePathPartResponse.md +40 -0
- package/docs/PaginatedResponsePermissionResponse.md +40 -0
- package/docs/PaginatedResponseTagResponse.md +40 -0
- package/docs/PaginatedResponseTenantResponse.md +40 -0
- package/docs/PaginatedResponseTenantUserResponse.md +40 -0
- package/docs/PaginatedResponseThreadMessageResponse.md +40 -0
- package/docs/PaginatedResponseThreadResponse.md +40 -0
- package/docs/PaginatedResponseWorkflowSummaryResponse.md +40 -0
- package/docs/PartType.md +33 -0
- package/docs/PasswordResetRequest.md +36 -0
- package/docs/PasswordResetWithTokenRequest.md +36 -0
- package/docs/PathOrder.md +33 -0
- package/docs/PathPartResponse.md +53 -0
- package/docs/PathPartTagsResponse.md +35 -0
- package/docs/PathPartsApi.md +461 -0
- package/docs/PermissionCapability.md +33 -0
- package/docs/PermissionResponse.md +48 -0
- package/docs/PipelineState.md +45 -0
- package/docs/PipelineStatus.md +33 -0
- package/docs/Polygon.md +41 -0
- package/docs/PolygonReference.md +37 -0
- package/docs/RootResponse.md +36 -0
- package/docs/ScoredChunkResponse.md +65 -0
- package/docs/SectionContentItem.md +55 -0
- package/docs/SectionContentItemOrChunkContentItem.md +60 -0
- package/docs/SectionResponse.md +57 -0
- package/docs/SectionsApi.md +299 -0
- package/docs/SignInRequest.md +38 -0
- package/docs/SubtreeChunkGroup.md +39 -0
- package/docs/SubtreeChunksResponse.md +35 -0
- package/docs/TagResponse.md +47 -0
- package/docs/TagsApi.md +374 -0
- package/docs/TenantResponse.md +39 -0
- package/docs/TenantUserEditRequest.md +35 -0
- package/docs/TenantUserResponse.md +43 -0
- package/docs/TenantUserRole.md +33 -0
- package/docs/TenantsApi.md +605 -0
- package/docs/ThreadMessageResponse.md +53 -0
- package/docs/ThreadMessagesApi.md +239 -0
- package/docs/ThreadResponse.md +49 -0
- package/docs/ThreadsApi.md +455 -0
- package/docs/UpdateChunkContentRequest.md +37 -0
- package/docs/UpdateChunkMetadataRequest.md +35 -0
- package/docs/UpdateDocumentRequest.md +39 -0
- package/docs/UpdateFolderRequest.md +37 -0
- package/docs/UpdatePermissionRequest.md +36 -0
- package/docs/UpdateSectionRequest.md +41 -0
- package/docs/UpdateTagRequest.md +39 -0
- package/docs/UpdateTenantRequest.md +37 -0
- package/docs/UpdateThreadRequest.md +37 -0
- package/docs/UpdateUserRequest.md +34 -0
- package/docs/UserPermissionsApi.md +314 -0
- package/docs/UserResponse.md +44 -0
- package/docs/UsersApi.md +149 -0
- package/docs/ValidationError.md +42 -0
- package/docs/VersionChunkIdsResponse.md +35 -0
- package/docs/WorkflowAction.md +33 -0
- package/docs/WorkflowActionResponse.md +39 -0
- package/docs/WorkflowDetailResponse.md +63 -0
- package/docs/WorkflowSummaryResponse.md +49 -0
- package/docs/WorkflowsApi.md +230 -0
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +214 -47
- package/src/apis/ChunkLineagesApi.ts +68 -15
- package/src/apis/ChunksApi.ts +298 -33
- package/src/apis/DefaultApi.ts +40 -10
- package/src/apis/DocumentVersionsApi.ts +170 -45
- package/src/apis/DocumentsApi.ts +140 -30
- package/src/apis/FoldersApi.ts +153 -40
- package/src/apis/InvitesApi.ts +91 -20
- package/src/apis/PathPartsApi.ts +260 -20
- package/src/apis/SectionsApi.ts +89 -20
- package/src/apis/TagsApi.ts +112 -25
- package/src/apis/TenantsApi.ts +183 -40
- package/src/apis/ThreadMessagesApi.ts +71 -15
- package/src/apis/ThreadsApi.ts +137 -30
- package/src/apis/UserPermissionsApi.ts +94 -20
- package/src/apis/UsersApi.ts +43 -10
- package/src/apis/WorkflowsApi.ts +68 -15
- package/src/models/ChunkBulkResponse.ts +232 -0
- package/src/models/{DocumentContentPathPart.ts → ChunkContentItem.ts} +43 -53
- package/src/models/ChunkSearchRequest.ts +20 -4
- package/src/models/DocumentResponse.ts +17 -0
- package/src/models/FolderResponse.ts +19 -0
- package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
- package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
- package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
- package/src/models/SectionContentItem.ts +182 -0
- package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
- package/src/models/SubtreeChunkGroup.ts +104 -0
- package/src/models/SubtreeChunksResponse.ts +91 -0
- package/src/models/VersionChunkIdsResponse.ts +83 -0
- package/src/models/index.ts +10 -4
- package/dist/esm/models/FolderDocumentResponse.d.ts +0 -157
- package/dist/esm/models/FolderDocumentResponse.js +0 -99
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +0 -70
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +0 -70
- package/dist/models/FolderDocumentResponse.d.ts +0 -157
- package/dist/models/FolderDocumentResponse.js +0 -107
- package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
- package/dist/models/PaginatedResponseDocumentContentPathPart.js +0 -78
- package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
- package/dist/models/PaginatedResponseFolderDocumentResponse.js +0 -78
- package/src/models/FolderDocumentResponse.ts +0 -267
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +0 -130
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
# ChunksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createChunk**](ChunksApi.md#createchunkoperation) | **POST** /v1/chunks | Create Chunk Handler |
|
|
8
|
+
| [**deleteChunk**](ChunksApi.md#deletechunk) | **DELETE** /v1/chunks/{chunk_id} | Delete Chunk Handler |
|
|
9
|
+
| [**getChunk**](ChunksApi.md#getchunk) | **GET** /v1/chunks/{chunk_id} | Get Chunk Handler |
|
|
10
|
+
| [**getChunksBulk**](ChunksApi.md#getchunksbulk) | **GET** /v1/chunks/bulk | Get Chunks Bulk Handler |
|
|
11
|
+
| [**getVersionChunkIds**](ChunksApi.md#getversionchunkids) | **GET** /v1/chunks/version-chunk-ids | Get Version Chunk Ids Handler |
|
|
12
|
+
| [**searchChunks**](ChunksApi.md#searchchunks) | **POST** /v1/chunks/search | Search Chunks Handler |
|
|
13
|
+
| [**updateChunkContent**](ChunksApi.md#updatechunkcontentoperation) | **PATCH** /v1/chunks/{chunk_id}/content | Update Chunk Content Handler |
|
|
14
|
+
| [**updateChunkMetadata**](ChunksApi.md#updatechunkmetadataoperation) | **PATCH** /v1/chunks/{chunk_id} | Update Chunk Metadata Handler |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## createChunk
|
|
19
|
+
|
|
20
|
+
> ChunkResponse createChunk(createChunkRequest, ksUat)
|
|
21
|
+
|
|
22
|
+
Create Chunk Handler
|
|
23
|
+
|
|
24
|
+
Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import {
|
|
30
|
+
Configuration,
|
|
31
|
+
ChunksApi,
|
|
32
|
+
} from '@knowledge-stack/ksapi';
|
|
33
|
+
import type { CreateChunkOperationRequest } from '@knowledge-stack/ksapi';
|
|
34
|
+
|
|
35
|
+
async function example() {
|
|
36
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
37
|
+
const api = new ChunksApi();
|
|
38
|
+
|
|
39
|
+
const body = {
|
|
40
|
+
// CreateChunkRequest
|
|
41
|
+
createChunkRequest: ...,
|
|
42
|
+
// string (optional)
|
|
43
|
+
ksUat: ksUat_example,
|
|
44
|
+
} satisfies CreateChunkOperationRequest;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const data = await api.createChunk(body);
|
|
48
|
+
console.log(data);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Run the test
|
|
55
|
+
example().catch(console.error);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
| Name | Type | Description | Notes |
|
|
62
|
+
|------------- | ------------- | ------------- | -------------|
|
|
63
|
+
| **createChunkRequest** | [CreateChunkRequest](CreateChunkRequest.md) | | |
|
|
64
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**ChunkResponse**](ChunkResponse.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
No authorization required
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: `application/json`
|
|
77
|
+
- **Accept**: `application/json`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### HTTP response details
|
|
81
|
+
| Status code | Description | Response headers |
|
|
82
|
+
|-------------|-------------|------------------|
|
|
83
|
+
| **201** | Successful Response | - |
|
|
84
|
+
| **422** | Validation Error | - |
|
|
85
|
+
|
|
86
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## deleteChunk
|
|
90
|
+
|
|
91
|
+
> deleteChunk(chunkId, ksUat)
|
|
92
|
+
|
|
93
|
+
Delete Chunk Handler
|
|
94
|
+
|
|
95
|
+
Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
96
|
+
|
|
97
|
+
### Example
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import {
|
|
101
|
+
Configuration,
|
|
102
|
+
ChunksApi,
|
|
103
|
+
} from '@knowledge-stack/ksapi';
|
|
104
|
+
import type { DeleteChunkRequest } from '@knowledge-stack/ksapi';
|
|
105
|
+
|
|
106
|
+
async function example() {
|
|
107
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
108
|
+
const api = new ChunksApi();
|
|
109
|
+
|
|
110
|
+
const body = {
|
|
111
|
+
// string
|
|
112
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
113
|
+
// string (optional)
|
|
114
|
+
ksUat: ksUat_example,
|
|
115
|
+
} satisfies DeleteChunkRequest;
|
|
116
|
+
|
|
117
|
+
try {
|
|
118
|
+
const data = await api.deleteChunk(body);
|
|
119
|
+
console.log(data);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.error(error);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Run the test
|
|
126
|
+
example().catch(console.error);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
| Name | Type | Description | Notes |
|
|
133
|
+
|------------- | ------------- | ------------- | -------------|
|
|
134
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
135
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
136
|
+
|
|
137
|
+
### Return type
|
|
138
|
+
|
|
139
|
+
`void` (Empty response body)
|
|
140
|
+
|
|
141
|
+
### Authorization
|
|
142
|
+
|
|
143
|
+
No authorization required
|
|
144
|
+
|
|
145
|
+
### HTTP request headers
|
|
146
|
+
|
|
147
|
+
- **Content-Type**: Not defined
|
|
148
|
+
- **Accept**: `application/json`
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### HTTP response details
|
|
152
|
+
| Status code | Description | Response headers |
|
|
153
|
+
|-------------|-------------|------------------|
|
|
154
|
+
| **204** | Successful Response | - |
|
|
155
|
+
| **422** | Validation Error | - |
|
|
156
|
+
|
|
157
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## getChunk
|
|
161
|
+
|
|
162
|
+
> ChunkResponse getChunk(chunkId, ksUat)
|
|
163
|
+
|
|
164
|
+
Get Chunk Handler
|
|
165
|
+
|
|
166
|
+
Get a chunk by its ID, including content.
|
|
167
|
+
|
|
168
|
+
### Example
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
import {
|
|
172
|
+
Configuration,
|
|
173
|
+
ChunksApi,
|
|
174
|
+
} from '@knowledge-stack/ksapi';
|
|
175
|
+
import type { GetChunkRequest } from '@knowledge-stack/ksapi';
|
|
176
|
+
|
|
177
|
+
async function example() {
|
|
178
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
179
|
+
const api = new ChunksApi();
|
|
180
|
+
|
|
181
|
+
const body = {
|
|
182
|
+
// string
|
|
183
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
184
|
+
// string (optional)
|
|
185
|
+
ksUat: ksUat_example,
|
|
186
|
+
} satisfies GetChunkRequest;
|
|
187
|
+
|
|
188
|
+
try {
|
|
189
|
+
const data = await api.getChunk(body);
|
|
190
|
+
console.log(data);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
console.error(error);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Run the test
|
|
197
|
+
example().catch(console.error);
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Parameters
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
| Name | Type | Description | Notes |
|
|
204
|
+
|------------- | ------------- | ------------- | -------------|
|
|
205
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
206
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
207
|
+
|
|
208
|
+
### Return type
|
|
209
|
+
|
|
210
|
+
[**ChunkResponse**](ChunkResponse.md)
|
|
211
|
+
|
|
212
|
+
### Authorization
|
|
213
|
+
|
|
214
|
+
No authorization required
|
|
215
|
+
|
|
216
|
+
### HTTP request headers
|
|
217
|
+
|
|
218
|
+
- **Content-Type**: Not defined
|
|
219
|
+
- **Accept**: `application/json`
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### HTTP response details
|
|
223
|
+
| Status code | Description | Response headers |
|
|
224
|
+
|-------------|-------------|------------------|
|
|
225
|
+
| **200** | Successful Response | - |
|
|
226
|
+
| **422** | Validation Error | - |
|
|
227
|
+
|
|
228
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
## getChunksBulk
|
|
232
|
+
|
|
233
|
+
> Array<ChunkBulkResponse> getChunksBulk(chunkIds, ksUat)
|
|
234
|
+
|
|
235
|
+
Get Chunks Bulk Handler
|
|
236
|
+
|
|
237
|
+
Batch-fetch chunks with their full ancestor path part IDs. Returns standard chunk data plus path_part_id_segments (the ordered ancestor chain from root to chunk) for each requested chunk. Non-existent IDs are silently skipped. Limited to 200 IDs per call.
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import {
|
|
243
|
+
Configuration,
|
|
244
|
+
ChunksApi,
|
|
245
|
+
} from '@knowledge-stack/ksapi';
|
|
246
|
+
import type { GetChunksBulkRequest } from '@knowledge-stack/ksapi';
|
|
247
|
+
|
|
248
|
+
async function example() {
|
|
249
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
250
|
+
const api = new ChunksApi();
|
|
251
|
+
|
|
252
|
+
const body = {
|
|
253
|
+
// Array<string> | Chunk IDs to resolve (max 200) (optional)
|
|
254
|
+
chunkIds: ...,
|
|
255
|
+
// string (optional)
|
|
256
|
+
ksUat: ksUat_example,
|
|
257
|
+
} satisfies GetChunksBulkRequest;
|
|
258
|
+
|
|
259
|
+
try {
|
|
260
|
+
const data = await api.getChunksBulk(body);
|
|
261
|
+
console.log(data);
|
|
262
|
+
} catch (error) {
|
|
263
|
+
console.error(error);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Run the test
|
|
268
|
+
example().catch(console.error);
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Parameters
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
| Name | Type | Description | Notes |
|
|
275
|
+
|------------- | ------------- | ------------- | -------------|
|
|
276
|
+
| **chunkIds** | `Array<string>` | Chunk IDs to resolve (max 200) | [Optional] |
|
|
277
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
278
|
+
|
|
279
|
+
### Return type
|
|
280
|
+
|
|
281
|
+
[**Array<ChunkBulkResponse>**](ChunkBulkResponse.md)
|
|
282
|
+
|
|
283
|
+
### Authorization
|
|
284
|
+
|
|
285
|
+
No authorization required
|
|
286
|
+
|
|
287
|
+
### HTTP request headers
|
|
288
|
+
|
|
289
|
+
- **Content-Type**: Not defined
|
|
290
|
+
- **Accept**: `application/json`
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
### HTTP response details
|
|
294
|
+
| Status code | Description | Response headers |
|
|
295
|
+
|-------------|-------------|------------------|
|
|
296
|
+
| **200** | Successful Response | - |
|
|
297
|
+
| **422** | Validation Error | - |
|
|
298
|
+
|
|
299
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## getVersionChunkIds
|
|
303
|
+
|
|
304
|
+
> VersionChunkIdsResponse getVersionChunkIds(documentVersionId, ksUat)
|
|
305
|
+
|
|
306
|
+
Get Version Chunk Ids Handler
|
|
307
|
+
|
|
308
|
+
Get all chunk IDs belonging to a document version. Used by the embedding pipeline to discover chunks for a version.
|
|
309
|
+
|
|
310
|
+
### Example
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
import {
|
|
314
|
+
Configuration,
|
|
315
|
+
ChunksApi,
|
|
316
|
+
} from '@knowledge-stack/ksapi';
|
|
317
|
+
import type { GetVersionChunkIdsRequest } from '@knowledge-stack/ksapi';
|
|
318
|
+
|
|
319
|
+
async function example() {
|
|
320
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
321
|
+
const api = new ChunksApi();
|
|
322
|
+
|
|
323
|
+
const body = {
|
|
324
|
+
// string | Document version ID
|
|
325
|
+
documentVersionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
326
|
+
// string (optional)
|
|
327
|
+
ksUat: ksUat_example,
|
|
328
|
+
} satisfies GetVersionChunkIdsRequest;
|
|
329
|
+
|
|
330
|
+
try {
|
|
331
|
+
const data = await api.getVersionChunkIds(body);
|
|
332
|
+
console.log(data);
|
|
333
|
+
} catch (error) {
|
|
334
|
+
console.error(error);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// Run the test
|
|
339
|
+
example().catch(console.error);
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Parameters
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
| Name | Type | Description | Notes |
|
|
346
|
+
|------------- | ------------- | ------------- | -------------|
|
|
347
|
+
| **documentVersionId** | `string` | Document version ID | [Defaults to `undefined`] |
|
|
348
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
349
|
+
|
|
350
|
+
### Return type
|
|
351
|
+
|
|
352
|
+
[**VersionChunkIdsResponse**](VersionChunkIdsResponse.md)
|
|
353
|
+
|
|
354
|
+
### Authorization
|
|
355
|
+
|
|
356
|
+
No authorization required
|
|
357
|
+
|
|
358
|
+
### HTTP request headers
|
|
359
|
+
|
|
360
|
+
- **Content-Type**: Not defined
|
|
361
|
+
- **Accept**: `application/json`
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
### HTTP response details
|
|
365
|
+
| Status code | Description | Response headers |
|
|
366
|
+
|-------------|-------------|------------------|
|
|
367
|
+
| **200** | Successful Response | - |
|
|
368
|
+
| **422** | Validation Error | - |
|
|
369
|
+
|
|
370
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
## searchChunks
|
|
374
|
+
|
|
375
|
+
> Array<ScoredChunkResponse> searchChunks(chunkSearchRequest, ksUat)
|
|
376
|
+
|
|
377
|
+
Search Chunks Handler
|
|
378
|
+
|
|
379
|
+
Semantic search over chunks using Qdrant vector similarity. Combines vector similarity with path-based authorization and optional metadata filters. Uses Qdrant for vector search and hydrates results from Postgres.
|
|
380
|
+
|
|
381
|
+
### Example
|
|
382
|
+
|
|
383
|
+
```ts
|
|
384
|
+
import {
|
|
385
|
+
Configuration,
|
|
386
|
+
ChunksApi,
|
|
387
|
+
} from '@knowledge-stack/ksapi';
|
|
388
|
+
import type { SearchChunksRequest } from '@knowledge-stack/ksapi';
|
|
389
|
+
|
|
390
|
+
async function example() {
|
|
391
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
392
|
+
const api = new ChunksApi();
|
|
393
|
+
|
|
394
|
+
const body = {
|
|
395
|
+
// ChunkSearchRequest
|
|
396
|
+
chunkSearchRequest: ...,
|
|
397
|
+
// string (optional)
|
|
398
|
+
ksUat: ksUat_example,
|
|
399
|
+
} satisfies SearchChunksRequest;
|
|
400
|
+
|
|
401
|
+
try {
|
|
402
|
+
const data = await api.searchChunks(body);
|
|
403
|
+
console.log(data);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
console.error(error);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Run the test
|
|
410
|
+
example().catch(console.error);
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Parameters
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
| Name | Type | Description | Notes |
|
|
417
|
+
|------------- | ------------- | ------------- | -------------|
|
|
418
|
+
| **chunkSearchRequest** | [ChunkSearchRequest](ChunkSearchRequest.md) | | |
|
|
419
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
420
|
+
|
|
421
|
+
### Return type
|
|
422
|
+
|
|
423
|
+
[**Array<ScoredChunkResponse>**](ScoredChunkResponse.md)
|
|
424
|
+
|
|
425
|
+
### Authorization
|
|
426
|
+
|
|
427
|
+
No authorization required
|
|
428
|
+
|
|
429
|
+
### HTTP request headers
|
|
430
|
+
|
|
431
|
+
- **Content-Type**: `application/json`
|
|
432
|
+
- **Accept**: `application/json`
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
### HTTP response details
|
|
436
|
+
| Status code | Description | Response headers |
|
|
437
|
+
|-------------|-------------|------------------|
|
|
438
|
+
| **200** | Successful Response | - |
|
|
439
|
+
| **422** | Validation Error | - |
|
|
440
|
+
|
|
441
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
## updateChunkContent
|
|
445
|
+
|
|
446
|
+
> ChunkResponse updateChunkContent(chunkId, updateChunkContentRequest, ksUat)
|
|
447
|
+
|
|
448
|
+
Update Chunk Content Handler
|
|
449
|
+
|
|
450
|
+
Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
451
|
+
|
|
452
|
+
### Example
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
import {
|
|
456
|
+
Configuration,
|
|
457
|
+
ChunksApi,
|
|
458
|
+
} from '@knowledge-stack/ksapi';
|
|
459
|
+
import type { UpdateChunkContentOperationRequest } from '@knowledge-stack/ksapi';
|
|
460
|
+
|
|
461
|
+
async function example() {
|
|
462
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
463
|
+
const api = new ChunksApi();
|
|
464
|
+
|
|
465
|
+
const body = {
|
|
466
|
+
// string
|
|
467
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
468
|
+
// UpdateChunkContentRequest
|
|
469
|
+
updateChunkContentRequest: ...,
|
|
470
|
+
// string (optional)
|
|
471
|
+
ksUat: ksUat_example,
|
|
472
|
+
} satisfies UpdateChunkContentOperationRequest;
|
|
473
|
+
|
|
474
|
+
try {
|
|
475
|
+
const data = await api.updateChunkContent(body);
|
|
476
|
+
console.log(data);
|
|
477
|
+
} catch (error) {
|
|
478
|
+
console.error(error);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// Run the test
|
|
483
|
+
example().catch(console.error);
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Parameters
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
| Name | Type | Description | Notes |
|
|
490
|
+
|------------- | ------------- | ------------- | -------------|
|
|
491
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
492
|
+
| **updateChunkContentRequest** | [UpdateChunkContentRequest](UpdateChunkContentRequest.md) | | |
|
|
493
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
494
|
+
|
|
495
|
+
### Return type
|
|
496
|
+
|
|
497
|
+
[**ChunkResponse**](ChunkResponse.md)
|
|
498
|
+
|
|
499
|
+
### Authorization
|
|
500
|
+
|
|
501
|
+
No authorization required
|
|
502
|
+
|
|
503
|
+
### HTTP request headers
|
|
504
|
+
|
|
505
|
+
- **Content-Type**: `application/json`
|
|
506
|
+
- **Accept**: `application/json`
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
### HTTP response details
|
|
510
|
+
| Status code | Description | Response headers |
|
|
511
|
+
|-------------|-------------|------------------|
|
|
512
|
+
| **200** | Successful Response | - |
|
|
513
|
+
| **422** | Validation Error | - |
|
|
514
|
+
|
|
515
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
## updateChunkMetadata
|
|
519
|
+
|
|
520
|
+
> ChunkResponse updateChunkMetadata(chunkId, updateChunkMetadataRequest, ksUat)
|
|
521
|
+
|
|
522
|
+
Update Chunk Metadata Handler
|
|
523
|
+
|
|
524
|
+
Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
525
|
+
|
|
526
|
+
### Example
|
|
527
|
+
|
|
528
|
+
```ts
|
|
529
|
+
import {
|
|
530
|
+
Configuration,
|
|
531
|
+
ChunksApi,
|
|
532
|
+
} from '@knowledge-stack/ksapi';
|
|
533
|
+
import type { UpdateChunkMetadataOperationRequest } from '@knowledge-stack/ksapi';
|
|
534
|
+
|
|
535
|
+
async function example() {
|
|
536
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
537
|
+
const api = new ChunksApi();
|
|
538
|
+
|
|
539
|
+
const body = {
|
|
540
|
+
// string
|
|
541
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
542
|
+
// UpdateChunkMetadataRequest
|
|
543
|
+
updateChunkMetadataRequest: ...,
|
|
544
|
+
// string (optional)
|
|
545
|
+
ksUat: ksUat_example,
|
|
546
|
+
} satisfies UpdateChunkMetadataOperationRequest;
|
|
547
|
+
|
|
548
|
+
try {
|
|
549
|
+
const data = await api.updateChunkMetadata(body);
|
|
550
|
+
console.log(data);
|
|
551
|
+
} catch (error) {
|
|
552
|
+
console.error(error);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// Run the test
|
|
557
|
+
example().catch(console.error);
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### Parameters
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
| Name | Type | Description | Notes |
|
|
564
|
+
|------------- | ------------- | ------------- | -------------|
|
|
565
|
+
| **chunkId** | `string` | | [Defaults to `undefined`] |
|
|
566
|
+
| **updateChunkMetadataRequest** | [UpdateChunkMetadataRequest](UpdateChunkMetadataRequest.md) | | |
|
|
567
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
568
|
+
|
|
569
|
+
### Return type
|
|
570
|
+
|
|
571
|
+
[**ChunkResponse**](ChunkResponse.md)
|
|
572
|
+
|
|
573
|
+
### Authorization
|
|
574
|
+
|
|
575
|
+
No authorization required
|
|
576
|
+
|
|
577
|
+
### HTTP request headers
|
|
578
|
+
|
|
579
|
+
- **Content-Type**: `application/json`
|
|
580
|
+
- **Accept**: `application/json`
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
### HTTP response details
|
|
584
|
+
| Status code | Description | Response headers |
|
|
585
|
+
|-------------|-------------|------------------|
|
|
586
|
+
| **200** | Successful Response | - |
|
|
587
|
+
| **422** | Validation Error | - |
|
|
588
|
+
|
|
589
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
590
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# ClearVersionContentsResponse
|
|
3
|
+
|
|
4
|
+
Response model for the clear version contents endpoint.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`deleted` | number
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ClearVersionContentsResponse } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"deleted": null,
|
|
20
|
+
} satisfies ClearVersionContentsResponse
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as ClearVersionContentsResponse
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateChunkLineageRequest
|
|
3
|
+
|
|
4
|
+
Request to batch-create lineage edges for a child chunk.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`chunkId` | string
|
|
11
|
+
`parentChunkIds` | Array<string>
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CreateChunkLineageRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"chunkId": null,
|
|
21
|
+
"parentChunkIds": null,
|
|
22
|
+
} satisfies CreateChunkLineageRequest
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateChunkLineageRequest
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateChunkRequest
|
|
3
|
+
|
|
4
|
+
Request to create a new chunk.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`parentPathId` | string
|
|
11
|
+
`content` | string
|
|
12
|
+
`chunkType` | [ChunkType](ChunkType.md)
|
|
13
|
+
`chunkMetadata` | [ChunkMetadataInput](ChunkMetadataInput.md)
|
|
14
|
+
`prevSiblingPathId` | string
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { CreateChunkRequest } from '@knowledge-stack/ksapi'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"parentPathId": null,
|
|
24
|
+
"content": null,
|
|
25
|
+
"chunkType": null,
|
|
26
|
+
"chunkMetadata": null,
|
|
27
|
+
"prevSiblingPathId": null,
|
|
28
|
+
} satisfies CreateChunkRequest
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateChunkRequest
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|