@knowledge-stack/ksapi 1.23.5 → 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 +122 -4
- 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 +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 +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 +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/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +17 -16
- 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/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 +86 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
- package/dist/esm/models/index.d.ts +6 -4
- package/dist/esm/models/index.js +6 -4
- package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +23 -22
- 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/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 +94 -0
- package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
- package/dist/models/index.d.ts +6 -4
- package/dist/models/index.js +6 -4
- 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 +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/{DocumentContentPathPart.ts → ChunkContentItem.ts} +42 -53
- package/src/models/DocumentResponse.ts +16 -0
- package/src/models/FolderResponse.ts +18 -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 +181 -0
- package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
- package/src/models/index.ts +6 -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,35 @@
|
|
|
1
|
+
|
|
2
|
+
# BulkTagRequest
|
|
3
|
+
|
|
4
|
+
Request to bulk add or remove tags from a path part.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`tagIds` | Array<string>
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { BulkTagRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"tagIds": null,
|
|
20
|
+
} satisfies BulkTagRequest
|
|
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 BulkTagRequest
|
|
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,59 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkContentItem
|
|
3
|
+
|
|
4
|
+
Response model for a chunk item in document version contents.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`partType` | string
|
|
11
|
+
`pathPartId` | string
|
|
12
|
+
`name` | string
|
|
13
|
+
`parentPathId` | string
|
|
14
|
+
`metadataObjId` | string
|
|
15
|
+
`depth` | number
|
|
16
|
+
`content` | string
|
|
17
|
+
`chunkType` | [ChunkType](ChunkType.md)
|
|
18
|
+
`chunkMetadata` | [ChunkMetadataOutput](ChunkMetadataOutput.md)
|
|
19
|
+
`materializedPath` | string
|
|
20
|
+
`systemManaged` | boolean
|
|
21
|
+
`createdAt` | Date
|
|
22
|
+
`updatedAt` | Date
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type { ChunkContentItem } from '@knowledge-stack/ksapi'
|
|
28
|
+
|
|
29
|
+
// TODO: Update the object below with actual values
|
|
30
|
+
const example = {
|
|
31
|
+
"partType": null,
|
|
32
|
+
"pathPartId": null,
|
|
33
|
+
"name": null,
|
|
34
|
+
"parentPathId": null,
|
|
35
|
+
"metadataObjId": null,
|
|
36
|
+
"depth": null,
|
|
37
|
+
"content": null,
|
|
38
|
+
"chunkType": null,
|
|
39
|
+
"chunkMetadata": null,
|
|
40
|
+
"materializedPath": null,
|
|
41
|
+
"systemManaged": null,
|
|
42
|
+
"createdAt": null,
|
|
43
|
+
"updatedAt": null,
|
|
44
|
+
} satisfies ChunkContentItem
|
|
45
|
+
|
|
46
|
+
console.log(example)
|
|
47
|
+
|
|
48
|
+
// Convert the instance to a JSON string
|
|
49
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
50
|
+
console.log(exampleJSON)
|
|
51
|
+
|
|
52
|
+
// Parse the JSON string back to an object
|
|
53
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkContentItem
|
|
54
|
+
console.log(exampleParsed)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkLineageResponse
|
|
3
|
+
|
|
4
|
+
Single chunk lineage edge response.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`parentChunkId` | string
|
|
11
|
+
`chunkId` | string
|
|
12
|
+
`tenantId` | string
|
|
13
|
+
`createdAt` | Date
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { ChunkLineageResponse } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"parentChunkId": null,
|
|
23
|
+
"chunkId": null,
|
|
24
|
+
"tenantId": null,
|
|
25
|
+
"createdAt": null,
|
|
26
|
+
} satisfies ChunkLineageResponse
|
|
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 ChunkLineageResponse
|
|
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,230 @@
|
|
|
1
|
+
# ChunkLineagesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createChunkLineage**](ChunkLineagesApi.md#createchunklineageoperation) | **POST** /v1/chunk-lineages | Create Chunk Lineage Handler |
|
|
8
|
+
| [**deleteChunkLineage**](ChunkLineagesApi.md#deletechunklineage) | **DELETE** /v1/chunk-lineages | Delete Chunk Lineage Handler |
|
|
9
|
+
| [**getChunkLineage**](ChunkLineagesApi.md#getchunklineage) | **GET** /v1/chunk-lineages/{chunk_id} | Get Chunk Lineage Handler |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## createChunkLineage
|
|
14
|
+
|
|
15
|
+
> Array<ChunkLineageResponse> createChunkLineage(createChunkLineageRequest, ksUat)
|
|
16
|
+
|
|
17
|
+
Create Chunk Lineage Handler
|
|
18
|
+
|
|
19
|
+
Batch-create lineage edges for a child chunk. Creates edges from each parent chunk to the specified child chunk. All chunks must exist in the same tenant.
|
|
20
|
+
|
|
21
|
+
### Example
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
Configuration,
|
|
26
|
+
ChunkLineagesApi,
|
|
27
|
+
} from '@knowledge-stack/ksapi';
|
|
28
|
+
import type { CreateChunkLineageOperationRequest } from '@knowledge-stack/ksapi';
|
|
29
|
+
|
|
30
|
+
async function example() {
|
|
31
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
32
|
+
const api = new ChunkLineagesApi();
|
|
33
|
+
|
|
34
|
+
const body = {
|
|
35
|
+
// CreateChunkLineageRequest
|
|
36
|
+
createChunkLineageRequest: ...,
|
|
37
|
+
// string (optional)
|
|
38
|
+
ksUat: ksUat_example,
|
|
39
|
+
} satisfies CreateChunkLineageOperationRequest;
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
const data = await api.createChunkLineage(body);
|
|
43
|
+
console.log(data);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Run the test
|
|
50
|
+
example().catch(console.error);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
| Name | Type | Description | Notes |
|
|
57
|
+
|------------- | ------------- | ------------- | -------------|
|
|
58
|
+
| **createChunkLineageRequest** | [CreateChunkLineageRequest](CreateChunkLineageRequest.md) | | |
|
|
59
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
60
|
+
|
|
61
|
+
### Return type
|
|
62
|
+
|
|
63
|
+
[**Array<ChunkLineageResponse>**](ChunkLineageResponse.md)
|
|
64
|
+
|
|
65
|
+
### Authorization
|
|
66
|
+
|
|
67
|
+
No authorization required
|
|
68
|
+
|
|
69
|
+
### HTTP request headers
|
|
70
|
+
|
|
71
|
+
- **Content-Type**: `application/json`
|
|
72
|
+
- **Accept**: `application/json`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### HTTP response details
|
|
76
|
+
| Status code | Description | Response headers |
|
|
77
|
+
|-------------|-------------|------------------|
|
|
78
|
+
| **201** | Successful Response | - |
|
|
79
|
+
| **422** | Validation Error | - |
|
|
80
|
+
|
|
81
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## deleteChunkLineage
|
|
85
|
+
|
|
86
|
+
> deleteChunkLineage(parentChunkId, chunkId, ksUat)
|
|
87
|
+
|
|
88
|
+
Delete Chunk Lineage Handler
|
|
89
|
+
|
|
90
|
+
Delete a single lineage edge between parent and child chunks.
|
|
91
|
+
|
|
92
|
+
### Example
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import {
|
|
96
|
+
Configuration,
|
|
97
|
+
ChunkLineagesApi,
|
|
98
|
+
} from '@knowledge-stack/ksapi';
|
|
99
|
+
import type { DeleteChunkLineageRequest } from '@knowledge-stack/ksapi';
|
|
100
|
+
|
|
101
|
+
async function example() {
|
|
102
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
103
|
+
const api = new ChunkLineagesApi();
|
|
104
|
+
|
|
105
|
+
const body = {
|
|
106
|
+
// string | Parent chunk ID
|
|
107
|
+
parentChunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
108
|
+
// string | Child chunk ID
|
|
109
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
110
|
+
// string (optional)
|
|
111
|
+
ksUat: ksUat_example,
|
|
112
|
+
} satisfies DeleteChunkLineageRequest;
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
const data = await api.deleteChunkLineage(body);
|
|
116
|
+
console.log(data);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error(error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Run the test
|
|
123
|
+
example().catch(console.error);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Parameters
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
| Name | Type | Description | Notes |
|
|
130
|
+
|------------- | ------------- | ------------- | -------------|
|
|
131
|
+
| **parentChunkId** | `string` | Parent chunk ID | [Defaults to `undefined`] |
|
|
132
|
+
| **chunkId** | `string` | Child chunk ID | [Defaults to `undefined`] |
|
|
133
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
134
|
+
|
|
135
|
+
### Return type
|
|
136
|
+
|
|
137
|
+
`void` (Empty response body)
|
|
138
|
+
|
|
139
|
+
### Authorization
|
|
140
|
+
|
|
141
|
+
No authorization required
|
|
142
|
+
|
|
143
|
+
### HTTP request headers
|
|
144
|
+
|
|
145
|
+
- **Content-Type**: Not defined
|
|
146
|
+
- **Accept**: `application/json`
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### HTTP response details
|
|
150
|
+
| Status code | Description | Response headers |
|
|
151
|
+
|-------------|-------------|------------------|
|
|
152
|
+
| **204** | Successful Response | - |
|
|
153
|
+
| **422** | Validation Error | - |
|
|
154
|
+
|
|
155
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## getChunkLineage
|
|
159
|
+
|
|
160
|
+
> LineageGraphResponse getChunkLineage(chunkId, maxDepth, ksUat)
|
|
161
|
+
|
|
162
|
+
Get Chunk Lineage Handler
|
|
163
|
+
|
|
164
|
+
Get lineage graph for a chunk. Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
|
|
165
|
+
|
|
166
|
+
### Example
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
import {
|
|
170
|
+
Configuration,
|
|
171
|
+
ChunkLineagesApi,
|
|
172
|
+
} from '@knowledge-stack/ksapi';
|
|
173
|
+
import type { GetChunkLineageRequest } from '@knowledge-stack/ksapi';
|
|
174
|
+
|
|
175
|
+
async function example() {
|
|
176
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
177
|
+
const api = new ChunkLineagesApi();
|
|
178
|
+
|
|
179
|
+
const body = {
|
|
180
|
+
// string
|
|
181
|
+
chunkId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
182
|
+
// number (optional)
|
|
183
|
+
maxDepth: 56,
|
|
184
|
+
// string (optional)
|
|
185
|
+
ksUat: ksUat_example,
|
|
186
|
+
} satisfies GetChunkLineageRequest;
|
|
187
|
+
|
|
188
|
+
try {
|
|
189
|
+
const data = await api.getChunkLineage(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
|
+
| **maxDepth** | `number` | | [Optional] [Defaults to `3`] |
|
|
207
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
208
|
+
|
|
209
|
+
### Return type
|
|
210
|
+
|
|
211
|
+
[**LineageGraphResponse**](LineageGraphResponse.md)
|
|
212
|
+
|
|
213
|
+
### Authorization
|
|
214
|
+
|
|
215
|
+
No authorization required
|
|
216
|
+
|
|
217
|
+
### HTTP request headers
|
|
218
|
+
|
|
219
|
+
- **Content-Type**: Not defined
|
|
220
|
+
- **Accept**: `application/json`
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### HTTP response details
|
|
224
|
+
| Status code | Description | Response headers |
|
|
225
|
+
|-------------|-------------|------------------|
|
|
226
|
+
| **200** | Successful Response | - |
|
|
227
|
+
| **422** | Validation Error | - |
|
|
228
|
+
|
|
229
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
230
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkMetadataInput
|
|
3
|
+
|
|
4
|
+
Metadata for a chunk including source document references.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`polygons` | [Array<PolygonReference>](PolygonReference.md)
|
|
11
|
+
`s3Url` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChunkMetadataInput } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"polygons": null,
|
|
21
|
+
"s3Url": null,
|
|
22
|
+
} satisfies ChunkMetadataInput
|
|
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 ChunkMetadataInput
|
|
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,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkMetadataOutput
|
|
3
|
+
|
|
4
|
+
Metadata for a chunk including source document references.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`polygons` | [Array<PolygonReference>](PolygonReference.md)
|
|
11
|
+
`s3Url` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ChunkMetadataOutput } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"polygons": null,
|
|
21
|
+
"s3Url": null,
|
|
22
|
+
} satisfies ChunkMetadataOutput
|
|
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 ChunkMetadataOutput
|
|
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,63 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkResponse
|
|
3
|
+
|
|
4
|
+
Chunk response model.
|
|
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
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import type { ChunkResponse } from '@knowledge-stack/ksapi'
|
|
30
|
+
|
|
31
|
+
// TODO: Update the object below with actual values
|
|
32
|
+
const example = {
|
|
33
|
+
"id": null,
|
|
34
|
+
"pathPartId": null,
|
|
35
|
+
"contentId": null,
|
|
36
|
+
"content": null,
|
|
37
|
+
"chunkType": null,
|
|
38
|
+
"chunkMetadata": null,
|
|
39
|
+
"parentPathId": null,
|
|
40
|
+
"prevSiblingPathId": null,
|
|
41
|
+
"nextSiblingPathId": null,
|
|
42
|
+
"materializedPath": null,
|
|
43
|
+
"systemManaged": null,
|
|
44
|
+
"tenantId": null,
|
|
45
|
+
"createdAt": null,
|
|
46
|
+
"updatedAt": null,
|
|
47
|
+
"assetS3Url": null,
|
|
48
|
+
} satisfies ChunkResponse
|
|
49
|
+
|
|
50
|
+
console.log(example)
|
|
51
|
+
|
|
52
|
+
// Convert the instance to a JSON string
|
|
53
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
54
|
+
console.log(exampleJSON)
|
|
55
|
+
|
|
56
|
+
// Parse the JSON string back to an object
|
|
57
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkResponse
|
|
58
|
+
console.log(exampleParsed)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
62
|
+
|
|
63
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkSearchRequest
|
|
3
|
+
|
|
4
|
+
Request body for semantic chunk search.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`query` | string
|
|
11
|
+
`model` | [EmbeddingModel](EmbeddingModel.md)
|
|
12
|
+
`parentPathIds` | Array<string>
|
|
13
|
+
`chunkType` | [ChunkType](ChunkType.md)
|
|
14
|
+
`updatedAt` | Date
|
|
15
|
+
`topK` | number
|
|
16
|
+
`scoreThreshold` | number
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { ChunkSearchRequest } from '@knowledge-stack/ksapi'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"query": null,
|
|
26
|
+
"model": null,
|
|
27
|
+
"parentPathIds": null,
|
|
28
|
+
"chunkType": null,
|
|
29
|
+
"updatedAt": null,
|
|
30
|
+
"topK": null,
|
|
31
|
+
"scoreThreshold": null,
|
|
32
|
+
} satisfies ChunkSearchRequest
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkSearchRequest
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkType
|
|
3
|
+
|
|
4
|
+
Type of chunk content.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ChunkType } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ChunkType
|
|
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 ChunkType
|
|
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
|
+
|