@knowledge-stack/ksapi 1.23.4 → 1.24.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 +125 -6
- package/.openapi-generator/VERSION +1 -1
- package/README.md +274 -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 +78 -4
- package/dist/apis/ChunksApi.js +85 -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 +54 -0
- package/dist/apis/PathPartsApi.js +56 -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 +172 -5
- package/dist/apis/TenantsApi.js +179 -31
- 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 +78 -4
- package/dist/esm/apis/ChunksApi.js +85 -31
- 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 +54 -0
- package/dist/esm/apis/PathPartsApi.js +56 -20
- 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 +172 -5
- package/dist/esm/apis/TenantsApi.js +180 -32
- 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/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +17 -16
- package/dist/esm/models/ChunkResponse.d.ts +6 -0
- package/dist/esm/models/ChunkResponse.js +2 -0
- package/dist/esm/models/DocumentResponse.d.ts +13 -0
- package/dist/esm/models/DocumentResponse.js +8 -0
- package/dist/esm/models/FolderResponse.d.ts +13 -0
- package/dist/esm/models/FolderResponse.js +8 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
- package/dist/esm/models/InviteResponse.d.ts +7 -0
- package/dist/esm/models/InviteResponse.js +5 -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/PaginatedResponseTenantUserResponse.d.ts +66 -0
- package/dist/esm/models/{PaginatedResponseTenantUserInTenantResponse.js → PaginatedResponseTenantUserResponse.js} +12 -12
- package/dist/esm/models/ScoredChunkResponse.d.ts +6 -0
- package/dist/esm/models/ScoredChunkResponse.js +2 -0
- package/dist/esm/models/SectionContentItem.d.ts +114 -0
- package/dist/esm/models/SectionContentItem.js +86 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
- package/dist/esm/models/TenantUserEditRequest.d.ts +48 -0
- package/dist/esm/models/TenantUserEditRequest.js +45 -0
- package/dist/esm/models/{TenantUserInTenantResponse.d.ts → TenantUserResponse.d.ts} +19 -13
- package/dist/esm/models/{TenantUserInTenantResponse.js → TenantUserResponse.js} +13 -9
- package/dist/esm/models/index.d.ts +9 -6
- package/dist/esm/models/index.js +9 -6
- package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +23 -22
- package/dist/models/ChunkResponse.d.ts +6 -0
- package/dist/models/ChunkResponse.js +2 -0
- package/dist/models/DocumentResponse.d.ts +13 -0
- package/dist/models/DocumentResponse.js +9 -1
- package/dist/models/FolderResponse.d.ts +13 -0
- package/dist/models/FolderResponse.js +9 -1
- package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
- package/dist/models/InviteResponse.d.ts +7 -0
- package/dist/models/InviteResponse.js +5 -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/PaginatedResponseTenantUserResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseTenantUserResponse.js +78 -0
- package/dist/models/ScoredChunkResponse.d.ts +6 -0
- package/dist/models/ScoredChunkResponse.js +2 -0
- package/dist/models/SectionContentItem.d.ts +114 -0
- package/dist/models/SectionContentItem.js +94 -0
- package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
- package/dist/models/TenantUserEditRequest.d.ts +48 -0
- package/dist/models/TenantUserEditRequest.js +53 -0
- package/dist/models/{TenantUserInTenantResponse.d.ts → TenantUserResponse.d.ts} +19 -13
- package/dist/models/{TenantUserInTenantResponse.js → TenantUserResponse.js} +19 -15
- package/dist/models/index.d.ts +9 -6
- package/dist/models/index.js +9 -6
- package/docs/AuthApi.md +707 -0
- package/docs/BulkTagRequest.md +35 -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 +47 -0
- package/docs/ChunkType.md +33 -0
- package/docs/ChunksApi.md +446 -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 +314 -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/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/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 +137 -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 +94 -20
- package/src/apis/SectionsApi.ts +89 -20
- package/src/apis/TagsApi.ts +112 -25
- package/src/apis/TenantsApi.ts +339 -37
- 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/{DocumentContentPathPart.ts → ChunkContentItem.ts} +42 -53
- package/src/models/ChunkResponse.ts +8 -0
- package/src/models/DocumentResponse.ts +16 -0
- package/src/models/FolderResponse.ts +18 -0
- package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
- package/src/models/InviteResponse.ts +19 -0
- package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
- package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
- package/src/models/{PaginatedResponseFolderDocumentResponse.ts → PaginatedResponseTenantUserResponse.ts} +25 -25
- package/src/models/ScoredChunkResponse.ts +8 -0
- package/src/models/SectionContentItem.ts +181 -0
- package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
- package/src/models/TenantUserEditRequest.ts +93 -0
- package/src/models/{TenantUserInTenantResponse.ts → TenantUserResponse.ts} +24 -15
- package/src/models/index.ts +9 -6
- 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/esm/models/PaginatedResponseTenantUserInTenantResponse.d.ts +0 -66
- 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/dist/models/PaginatedResponseTenantUserInTenantResponse.d.ts +0 -66
- package/dist/models/PaginatedResponseTenantUserInTenantResponse.js +0 -78
- package/src/models/FolderDocumentResponse.ts +0 -267
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
- package/src/models/PaginatedResponseTenantUserInTenantResponse.ts +0 -130
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# PathPartsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**bulkAddPathPartTags**](PathPartsApi.md#bulkaddpathparttags) | **POST** /v1/path-parts/{path_part_id}/tags | Bulk Add Path Part Tags Handler |
|
|
8
|
+
| [**bulkRemovePathPartTags**](PathPartsApi.md#bulkremovepathparttags) | **DELETE** /v1/path-parts/{path_part_id}/tags | Bulk Remove Path Part Tags Handler |
|
|
9
|
+
| [**getPathPart**](PathPartsApi.md#getpathpart) | **GET** /v1/path-parts/{path_part_id} | Get Path Part Handler |
|
|
10
|
+
| [**listPathParts**](PathPartsApi.md#listpathparts) | **GET** /v1/path-parts | List Path Parts Handler |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## bulkAddPathPartTags
|
|
15
|
+
|
|
16
|
+
> PathPartTagsResponse bulkAddPathPartTags(pathPartId, bulkTagRequest, ksUat)
|
|
17
|
+
|
|
18
|
+
Bulk Add Path Part Tags Handler
|
|
19
|
+
|
|
20
|
+
Bulk add tags to a path part. Idempotent — already-attached tags are skipped. Returns 400 if any tag_id doesn\'t exist (FK violation). Requires write permission on the target path part.
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import {
|
|
26
|
+
Configuration,
|
|
27
|
+
PathPartsApi,
|
|
28
|
+
} from '@knowledge-stack/ksapi';
|
|
29
|
+
import type { BulkAddPathPartTagsRequest } from '@knowledge-stack/ksapi';
|
|
30
|
+
|
|
31
|
+
async function example() {
|
|
32
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
33
|
+
const api = new PathPartsApi();
|
|
34
|
+
|
|
35
|
+
const body = {
|
|
36
|
+
// string
|
|
37
|
+
pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
38
|
+
// BulkTagRequest
|
|
39
|
+
bulkTagRequest: ...,
|
|
40
|
+
// string (optional)
|
|
41
|
+
ksUat: ksUat_example,
|
|
42
|
+
} satisfies BulkAddPathPartTagsRequest;
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const data = await api.bulkAddPathPartTags(body);
|
|
46
|
+
console.log(data);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error(error);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Run the test
|
|
53
|
+
example().catch(console.error);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
| Name | Type | Description | Notes |
|
|
60
|
+
|------------- | ------------- | ------------- | -------------|
|
|
61
|
+
| **pathPartId** | `string` | | [Defaults to `undefined`] |
|
|
62
|
+
| **bulkTagRequest** | [BulkTagRequest](BulkTagRequest.md) | | |
|
|
63
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
64
|
+
|
|
65
|
+
### Return type
|
|
66
|
+
|
|
67
|
+
[**PathPartTagsResponse**](PathPartTagsResponse.md)
|
|
68
|
+
|
|
69
|
+
### Authorization
|
|
70
|
+
|
|
71
|
+
No authorization required
|
|
72
|
+
|
|
73
|
+
### HTTP request headers
|
|
74
|
+
|
|
75
|
+
- **Content-Type**: `application/json`
|
|
76
|
+
- **Accept**: `application/json`
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### HTTP response details
|
|
80
|
+
| Status code | Description | Response headers |
|
|
81
|
+
|-------------|-------------|------------------|
|
|
82
|
+
| **201** | Successful Response | - |
|
|
83
|
+
| **422** | Validation Error | - |
|
|
84
|
+
|
|
85
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## bulkRemovePathPartTags
|
|
89
|
+
|
|
90
|
+
> PathPartTagsResponse bulkRemovePathPartTags(pathPartId, bulkTagRequest, ksUat)
|
|
91
|
+
|
|
92
|
+
Bulk Remove Path Part Tags Handler
|
|
93
|
+
|
|
94
|
+
Bulk remove tags from a path part. Silently ignores tags that aren\'t attached. Requires write permission on the target path part.
|
|
95
|
+
|
|
96
|
+
### Example
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import {
|
|
100
|
+
Configuration,
|
|
101
|
+
PathPartsApi,
|
|
102
|
+
} from '@knowledge-stack/ksapi';
|
|
103
|
+
import type { BulkRemovePathPartTagsRequest } from '@knowledge-stack/ksapi';
|
|
104
|
+
|
|
105
|
+
async function example() {
|
|
106
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
107
|
+
const api = new PathPartsApi();
|
|
108
|
+
|
|
109
|
+
const body = {
|
|
110
|
+
// string
|
|
111
|
+
pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
112
|
+
// BulkTagRequest
|
|
113
|
+
bulkTagRequest: ...,
|
|
114
|
+
// string (optional)
|
|
115
|
+
ksUat: ksUat_example,
|
|
116
|
+
} satisfies BulkRemovePathPartTagsRequest;
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
const data = await api.bulkRemovePathPartTags(body);
|
|
120
|
+
console.log(data);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
console.error(error);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Run the test
|
|
127
|
+
example().catch(console.error);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
| Name | Type | Description | Notes |
|
|
134
|
+
|------------- | ------------- | ------------- | -------------|
|
|
135
|
+
| **pathPartId** | `string` | | [Defaults to `undefined`] |
|
|
136
|
+
| **bulkTagRequest** | [BulkTagRequest](BulkTagRequest.md) | | |
|
|
137
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
138
|
+
|
|
139
|
+
### Return type
|
|
140
|
+
|
|
141
|
+
[**PathPartTagsResponse**](PathPartTagsResponse.md)
|
|
142
|
+
|
|
143
|
+
### Authorization
|
|
144
|
+
|
|
145
|
+
No authorization required
|
|
146
|
+
|
|
147
|
+
### HTTP request headers
|
|
148
|
+
|
|
149
|
+
- **Content-Type**: `application/json`
|
|
150
|
+
- **Accept**: `application/json`
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### HTTP response details
|
|
154
|
+
| Status code | Description | Response headers |
|
|
155
|
+
|-------------|-------------|------------------|
|
|
156
|
+
| **200** | Successful Response | - |
|
|
157
|
+
| **422** | Validation Error | - |
|
|
158
|
+
|
|
159
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## getPathPart
|
|
163
|
+
|
|
164
|
+
> PathPartResponse getPathPart(pathPartId, ksUat)
|
|
165
|
+
|
|
166
|
+
Get Path Part Handler
|
|
167
|
+
|
|
168
|
+
Get a path part by its ID. Returns the path part with its attached tag IDs.
|
|
169
|
+
|
|
170
|
+
### Example
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
import {
|
|
174
|
+
Configuration,
|
|
175
|
+
PathPartsApi,
|
|
176
|
+
} from '@knowledge-stack/ksapi';
|
|
177
|
+
import type { GetPathPartRequest } from '@knowledge-stack/ksapi';
|
|
178
|
+
|
|
179
|
+
async function example() {
|
|
180
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
181
|
+
const api = new PathPartsApi();
|
|
182
|
+
|
|
183
|
+
const body = {
|
|
184
|
+
// string
|
|
185
|
+
pathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
186
|
+
// string (optional)
|
|
187
|
+
ksUat: ksUat_example,
|
|
188
|
+
} satisfies GetPathPartRequest;
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
const data = await api.getPathPart(body);
|
|
192
|
+
console.log(data);
|
|
193
|
+
} catch (error) {
|
|
194
|
+
console.error(error);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Run the test
|
|
199
|
+
example().catch(console.error);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Parameters
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
|------------- | ------------- | ------------- | -------------|
|
|
207
|
+
| **pathPartId** | `string` | | [Defaults to `undefined`] |
|
|
208
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
[**PathPartResponse**](PathPartResponse.md)
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
No authorization required
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: Not defined
|
|
221
|
+
- **Accept**: `application/json`
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
| **200** | Successful Response | - |
|
|
228
|
+
| **422** | Validation Error | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## listPathParts
|
|
234
|
+
|
|
235
|
+
> PaginatedResponsePathPartResponse listPathParts(parentPathId, maxDepth, sortOrder, limit, offset, ksUat)
|
|
236
|
+
|
|
237
|
+
List Path Parts Handler
|
|
238
|
+
|
|
239
|
+
List path parts (folders) under a parent with traversal. This is a generic endpoint for traversing the folder hierarchy. It returns only FOLDER type path parts. - If parent_path_id is not provided, lists contents of the root folder. - max_depth controls how deep to traverse (1 = direct children only). - sort_order controls the ordering: LOGICAL (linked-list), NAME, UPDATED_AT, CREATED_AT. For listing folder contents that includes documents with enriched metadata, use GET /folders/{folder_id}/contents instead.
|
|
240
|
+
|
|
241
|
+
### Example
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
import {
|
|
245
|
+
Configuration,
|
|
246
|
+
PathPartsApi,
|
|
247
|
+
} from '@knowledge-stack/ksapi';
|
|
248
|
+
import type { ListPathPartsRequest } from '@knowledge-stack/ksapi';
|
|
249
|
+
|
|
250
|
+
async function example() {
|
|
251
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
252
|
+
const api = new PathPartsApi();
|
|
253
|
+
|
|
254
|
+
const body = {
|
|
255
|
+
// string | Parent PathPart ID (defaults to root) (optional)
|
|
256
|
+
parentPathId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
257
|
+
// number | Maximum depth to traverse (1 = direct children, default: 1) (optional)
|
|
258
|
+
maxDepth: 56,
|
|
259
|
+
// PathOrder | Sort order for results (default: LOGICAL) (optional)
|
|
260
|
+
sortOrder: ...,
|
|
261
|
+
// number | Number of items per page (optional)
|
|
262
|
+
limit: 56,
|
|
263
|
+
// number | Number of items to skip (optional)
|
|
264
|
+
offset: 56,
|
|
265
|
+
// string (optional)
|
|
266
|
+
ksUat: ksUat_example,
|
|
267
|
+
} satisfies ListPathPartsRequest;
|
|
268
|
+
|
|
269
|
+
try {
|
|
270
|
+
const data = await api.listPathParts(body);
|
|
271
|
+
console.log(data);
|
|
272
|
+
} catch (error) {
|
|
273
|
+
console.error(error);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Run the test
|
|
278
|
+
example().catch(console.error);
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Parameters
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
| Name | Type | Description | Notes |
|
|
285
|
+
|------------- | ------------- | ------------- | -------------|
|
|
286
|
+
| **parentPathId** | `string` | Parent PathPart ID (defaults to root) | [Optional] [Defaults to `undefined`] |
|
|
287
|
+
| **maxDepth** | `number` | Maximum depth to traverse (1 = direct children, default: 1) | [Optional] [Defaults to `1`] |
|
|
288
|
+
| **sortOrder** | `PathOrder` | Sort order for results (default: LOGICAL) | [Optional] [Defaults to `undefined`] [Enum: LOGICAL, NAME, UPDATED_AT, CREATED_AT] |
|
|
289
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
290
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
291
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
292
|
+
|
|
293
|
+
### Return type
|
|
294
|
+
|
|
295
|
+
[**PaginatedResponsePathPartResponse**](PaginatedResponsePathPartResponse.md)
|
|
296
|
+
|
|
297
|
+
### Authorization
|
|
298
|
+
|
|
299
|
+
No authorization required
|
|
300
|
+
|
|
301
|
+
### HTTP request headers
|
|
302
|
+
|
|
303
|
+
- **Content-Type**: Not defined
|
|
304
|
+
- **Accept**: `application/json`
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### HTTP response details
|
|
308
|
+
| Status code | Description | Response headers |
|
|
309
|
+
|-------------|-------------|------------------|
|
|
310
|
+
| **200** | Successful Response | - |
|
|
311
|
+
| **422** | Validation Error | - |
|
|
312
|
+
|
|
313
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
314
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# PermissionCapability
|
|
3
|
+
|
|
4
|
+
Permission capability.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PermissionCapability } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies PermissionCapability
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as PermissionCapability
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
# PermissionResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`tenantId` | string
|
|
11
|
+
`userId` | string
|
|
12
|
+
`pathPartId` | string
|
|
13
|
+
`materializedPath` | string
|
|
14
|
+
`capability` | [PermissionCapability](PermissionCapability.md)
|
|
15
|
+
`createdAt` | Date
|
|
16
|
+
`updatedAt` | Date
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { PermissionResponse } from '@knowledge-stack/ksapi'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"id": null,
|
|
26
|
+
"tenantId": null,
|
|
27
|
+
"userId": null,
|
|
28
|
+
"pathPartId": null,
|
|
29
|
+
"materializedPath": null,
|
|
30
|
+
"capability": null,
|
|
31
|
+
"createdAt": null,
|
|
32
|
+
"updatedAt": null,
|
|
33
|
+
} satisfies PermissionResponse
|
|
34
|
+
|
|
35
|
+
console.log(example)
|
|
36
|
+
|
|
37
|
+
// Convert the instance to a JSON string
|
|
38
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
39
|
+
console.log(exampleJSON)
|
|
40
|
+
|
|
41
|
+
// Parse the JSON string back to an object
|
|
42
|
+
const exampleParsed = JSON.parse(exampleJSON) as PermissionResponse
|
|
43
|
+
console.log(exampleParsed)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
# PipelineState
|
|
3
|
+
|
|
4
|
+
Pipeline execution state tracking.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`status` | [PipelineStatus](PipelineStatus.md)
|
|
11
|
+
`lastRunTimestamp` | Date
|
|
12
|
+
`lastActivity` | string
|
|
13
|
+
`error` | string
|
|
14
|
+
`temporalWorkflowId` | string
|
|
15
|
+
`chunksProcessed` | number
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { PipelineState } from '@knowledge-stack/ksapi'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"status": null,
|
|
25
|
+
"lastRunTimestamp": null,
|
|
26
|
+
"lastActivity": null,
|
|
27
|
+
"error": null,
|
|
28
|
+
"temporalWorkflowId": null,
|
|
29
|
+
"chunksProcessed": null,
|
|
30
|
+
} satisfies PipelineState
|
|
31
|
+
|
|
32
|
+
console.log(example)
|
|
33
|
+
|
|
34
|
+
// Convert the instance to a JSON string
|
|
35
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
36
|
+
console.log(exampleJSON)
|
|
37
|
+
|
|
38
|
+
// Parse the JSON string back to an object
|
|
39
|
+
const exampleParsed = JSON.parse(exampleJSON) as PipelineState
|
|
40
|
+
console.log(exampleParsed)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
44
|
+
|
|
45
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# PipelineStatus
|
|
3
|
+
|
|
4
|
+
Status of the ingestion pipeline workflow.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { PipelineStatus } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies PipelineStatus
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as PipelineStatus
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
package/docs/Polygon.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# Polygon
|
|
3
|
+
|
|
4
|
+
Bounding box polygon.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`x` | number
|
|
11
|
+
`y` | number
|
|
12
|
+
`width` | number
|
|
13
|
+
`height` | number
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { Polygon } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"x": null,
|
|
23
|
+
"y": null,
|
|
24
|
+
"width": null,
|
|
25
|
+
"height": null,
|
|
26
|
+
} satisfies Polygon
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as Polygon
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# PolygonReference
|
|
3
|
+
|
|
4
|
+
Reference to a polygon on a specific page.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`page` | number
|
|
11
|
+
`polygon` | [Polygon](Polygon.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { PolygonReference } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"page": null,
|
|
21
|
+
"polygon": null,
|
|
22
|
+
} satisfies PolygonReference
|
|
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 PolygonReference
|
|
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,36 @@
|
|
|
1
|
+
|
|
2
|
+
# RootResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`service` | string
|
|
10
|
+
`docs` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { RootResponse } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"service": null,
|
|
20
|
+
"docs": null,
|
|
21
|
+
} satisfies RootResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as RootResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
|
|
2
|
+
# ScoredChunkResponse
|
|
3
|
+
|
|
4
|
+
Chunk response with similarity score.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`pathPartId` | string
|
|
12
|
+
`contentId` | string
|
|
13
|
+
`content` | string
|
|
14
|
+
`chunkType` | [ChunkType](ChunkType.md)
|
|
15
|
+
`chunkMetadata` | [ChunkMetadataOutput](ChunkMetadataOutput.md)
|
|
16
|
+
`parentPathId` | string
|
|
17
|
+
`prevSiblingPathId` | string
|
|
18
|
+
`nextSiblingPathId` | string
|
|
19
|
+
`materializedPath` | string
|
|
20
|
+
`systemManaged` | boolean
|
|
21
|
+
`tenantId` | string
|
|
22
|
+
`createdAt` | Date
|
|
23
|
+
`updatedAt` | Date
|
|
24
|
+
`assetS3Url` | string
|
|
25
|
+
`score` | number
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import type { ScoredChunkResponse } from '@knowledge-stack/ksapi'
|
|
31
|
+
|
|
32
|
+
// TODO: Update the object below with actual values
|
|
33
|
+
const example = {
|
|
34
|
+
"id": null,
|
|
35
|
+
"pathPartId": null,
|
|
36
|
+
"contentId": null,
|
|
37
|
+
"content": null,
|
|
38
|
+
"chunkType": null,
|
|
39
|
+
"chunkMetadata": null,
|
|
40
|
+
"parentPathId": null,
|
|
41
|
+
"prevSiblingPathId": null,
|
|
42
|
+
"nextSiblingPathId": null,
|
|
43
|
+
"materializedPath": null,
|
|
44
|
+
"systemManaged": null,
|
|
45
|
+
"tenantId": null,
|
|
46
|
+
"createdAt": null,
|
|
47
|
+
"updatedAt": null,
|
|
48
|
+
"assetS3Url": null,
|
|
49
|
+
"score": null,
|
|
50
|
+
} satisfies ScoredChunkResponse
|
|
51
|
+
|
|
52
|
+
console.log(example)
|
|
53
|
+
|
|
54
|
+
// Convert the instance to a JSON string
|
|
55
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
56
|
+
console.log(exampleJSON)
|
|
57
|
+
|
|
58
|
+
// Parse the JSON string back to an object
|
|
59
|
+
const exampleParsed = JSON.parse(exampleJSON) as ScoredChunkResponse
|
|
60
|
+
console.log(exampleParsed)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
64
|
+
|
|
65
|
+
|