@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,455 @@
|
|
|
1
|
+
# ThreadsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createThread**](ThreadsApi.md#createthreadoperation) | **POST** /v1/threads | Create Thread Handler |
|
|
8
|
+
| [**deleteThread**](ThreadsApi.md#deletethread) | **DELETE** /v1/threads/{thread_id} | Delete Thread Handler |
|
|
9
|
+
| [**getThread**](ThreadsApi.md#getthread) | **GET** /v1/threads/{thread_id} | Get Thread Handler |
|
|
10
|
+
| [**listThreads**](ThreadsApi.md#listthreads) | **GET** /v1/threads | List Threads Handler |
|
|
11
|
+
| [**streamThread**](ThreadsApi.md#streamthread) | **GET** /v1/threads/{thread_id}/stream | Stream Thread Handler |
|
|
12
|
+
| [**updateThread**](ThreadsApi.md#updatethreadoperation) | **PATCH** /v1/threads/{thread_id} | Update Thread Handler |
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## createThread
|
|
17
|
+
|
|
18
|
+
> ThreadResponse createThread(createThreadRequest, ksUat)
|
|
19
|
+
|
|
20
|
+
Create Thread Handler
|
|
21
|
+
|
|
22
|
+
Create a new thread. If parent_path_part_id is omitted, the thread is created under the user\'s /users/{user_id}/threads/ folder (auto-provisioned if needed).
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import {
|
|
28
|
+
Configuration,
|
|
29
|
+
ThreadsApi,
|
|
30
|
+
} from '@knowledge-stack/ksapi';
|
|
31
|
+
import type { CreateThreadOperationRequest } from '@knowledge-stack/ksapi';
|
|
32
|
+
|
|
33
|
+
async function example() {
|
|
34
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
35
|
+
const api = new ThreadsApi();
|
|
36
|
+
|
|
37
|
+
const body = {
|
|
38
|
+
// CreateThreadRequest
|
|
39
|
+
createThreadRequest: ...,
|
|
40
|
+
// string (optional)
|
|
41
|
+
ksUat: ksUat_example,
|
|
42
|
+
} satisfies CreateThreadOperationRequest;
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
const data = await api.createThread(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
|
+
| **createThreadRequest** | [CreateThreadRequest](CreateThreadRequest.md) | | |
|
|
62
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**ThreadResponse**](ThreadResponse.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
No authorization required
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: `application/json`
|
|
75
|
+
- **Accept**: `application/json`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### HTTP response details
|
|
79
|
+
| Status code | Description | Response headers |
|
|
80
|
+
|-------------|-------------|------------------|
|
|
81
|
+
| **201** | Successful Response | - |
|
|
82
|
+
| **422** | Validation Error | - |
|
|
83
|
+
|
|
84
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## deleteThread
|
|
88
|
+
|
|
89
|
+
> deleteThread(threadId, ksUat)
|
|
90
|
+
|
|
91
|
+
Delete Thread Handler
|
|
92
|
+
|
|
93
|
+
Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
|
|
94
|
+
|
|
95
|
+
### Example
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import {
|
|
99
|
+
Configuration,
|
|
100
|
+
ThreadsApi,
|
|
101
|
+
} from '@knowledge-stack/ksapi';
|
|
102
|
+
import type { DeleteThreadRequest } from '@knowledge-stack/ksapi';
|
|
103
|
+
|
|
104
|
+
async function example() {
|
|
105
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
106
|
+
const api = new ThreadsApi();
|
|
107
|
+
|
|
108
|
+
const body = {
|
|
109
|
+
// string
|
|
110
|
+
threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
111
|
+
// string (optional)
|
|
112
|
+
ksUat: ksUat_example,
|
|
113
|
+
} satisfies DeleteThreadRequest;
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
const data = await api.deleteThread(body);
|
|
117
|
+
console.log(data);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error(error);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Run the test
|
|
124
|
+
example().catch(console.error);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Parameters
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
| Name | Type | Description | Notes |
|
|
131
|
+
|------------- | ------------- | ------------- | -------------|
|
|
132
|
+
| **threadId** | `string` | | [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
|
+
## getThread
|
|
159
|
+
|
|
160
|
+
> ThreadResponse getThread(threadId, ksUat)
|
|
161
|
+
|
|
162
|
+
Get Thread Handler
|
|
163
|
+
|
|
164
|
+
Get a thread by its thread ID.
|
|
165
|
+
|
|
166
|
+
### Example
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
import {
|
|
170
|
+
Configuration,
|
|
171
|
+
ThreadsApi,
|
|
172
|
+
} from '@knowledge-stack/ksapi';
|
|
173
|
+
import type { GetThreadRequest } from '@knowledge-stack/ksapi';
|
|
174
|
+
|
|
175
|
+
async function example() {
|
|
176
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
177
|
+
const api = new ThreadsApi();
|
|
178
|
+
|
|
179
|
+
const body = {
|
|
180
|
+
// string
|
|
181
|
+
threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
182
|
+
// string (optional)
|
|
183
|
+
ksUat: ksUat_example,
|
|
184
|
+
} satisfies GetThreadRequest;
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
const data = await api.getThread(body);
|
|
188
|
+
console.log(data);
|
|
189
|
+
} catch (error) {
|
|
190
|
+
console.error(error);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Run the test
|
|
195
|
+
example().catch(console.error);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Parameters
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
| Name | Type | Description | Notes |
|
|
202
|
+
|------------- | ------------- | ------------- | -------------|
|
|
203
|
+
| **threadId** | `string` | | [Defaults to `undefined`] |
|
|
204
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
205
|
+
|
|
206
|
+
### Return type
|
|
207
|
+
|
|
208
|
+
[**ThreadResponse**](ThreadResponse.md)
|
|
209
|
+
|
|
210
|
+
### Authorization
|
|
211
|
+
|
|
212
|
+
No authorization required
|
|
213
|
+
|
|
214
|
+
### HTTP request headers
|
|
215
|
+
|
|
216
|
+
- **Content-Type**: Not defined
|
|
217
|
+
- **Accept**: `application/json`
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
### HTTP response details
|
|
221
|
+
| Status code | Description | Response headers |
|
|
222
|
+
|-------------|-------------|------------------|
|
|
223
|
+
| **200** | Successful Response | - |
|
|
224
|
+
| **422** | Validation Error | - |
|
|
225
|
+
|
|
226
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## listThreads
|
|
230
|
+
|
|
231
|
+
> PaginatedResponseThreadResponse listThreads(parentPathPartId, limit, offset, ksUat)
|
|
232
|
+
|
|
233
|
+
List Threads Handler
|
|
234
|
+
|
|
235
|
+
List threads under a parent path_part. When parent_path_part_id is omitted, lists the authenticated user\'s conversation threads from /users/{user_id}/threads/.
|
|
236
|
+
|
|
237
|
+
### Example
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import {
|
|
241
|
+
Configuration,
|
|
242
|
+
ThreadsApi,
|
|
243
|
+
} from '@knowledge-stack/ksapi';
|
|
244
|
+
import type { ListThreadsRequest } from '@knowledge-stack/ksapi';
|
|
245
|
+
|
|
246
|
+
async function example() {
|
|
247
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
248
|
+
const api = new ThreadsApi();
|
|
249
|
+
|
|
250
|
+
const body = {
|
|
251
|
+
// string | Parent PathPart ID. Omit to list user\'s conversation threads. (optional)
|
|
252
|
+
parentPathPartId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
253
|
+
// number | Number of items per page (optional)
|
|
254
|
+
limit: 56,
|
|
255
|
+
// number | Number of items to skip (optional)
|
|
256
|
+
offset: 56,
|
|
257
|
+
// string (optional)
|
|
258
|
+
ksUat: ksUat_example,
|
|
259
|
+
} satisfies ListThreadsRequest;
|
|
260
|
+
|
|
261
|
+
try {
|
|
262
|
+
const data = await api.listThreads(body);
|
|
263
|
+
console.log(data);
|
|
264
|
+
} catch (error) {
|
|
265
|
+
console.error(error);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Run the test
|
|
270
|
+
example().catch(console.error);
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Parameters
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
| Name | Type | Description | Notes |
|
|
277
|
+
|------------- | ------------- | ------------- | -------------|
|
|
278
|
+
| **parentPathPartId** | `string` | Parent PathPart ID. Omit to list user\'s conversation threads. | [Optional] [Defaults to `undefined`] |
|
|
279
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
280
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
281
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
[**PaginatedResponseThreadResponse**](PaginatedResponseThreadResponse.md)
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
No authorization required
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: Not defined
|
|
294
|
+
- **Accept**: `application/json`
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### HTTP response details
|
|
298
|
+
| Status code | Description | Response headers |
|
|
299
|
+
|-------------|-------------|------------------|
|
|
300
|
+
| **200** | Successful Response | - |
|
|
301
|
+
| **422** | Validation Error | - |
|
|
302
|
+
|
|
303
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## streamThread
|
|
307
|
+
|
|
308
|
+
> streamThread(threadId, lastMessageId, lastEntryId, ksUat)
|
|
309
|
+
|
|
310
|
+
Stream Thread Handler
|
|
311
|
+
|
|
312
|
+
SSE endpoint for streaming thread messages. Opens a server-sent event stream for the given thread. Optionally replays missed entries if last_message_id and last_entry_id are provided.
|
|
313
|
+
|
|
314
|
+
### Example
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
import {
|
|
318
|
+
Configuration,
|
|
319
|
+
ThreadsApi,
|
|
320
|
+
} from '@knowledge-stack/ksapi';
|
|
321
|
+
import type { StreamThreadRequest } from '@knowledge-stack/ksapi';
|
|
322
|
+
|
|
323
|
+
async function example() {
|
|
324
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
325
|
+
const api = new ThreadsApi();
|
|
326
|
+
|
|
327
|
+
const body = {
|
|
328
|
+
// string
|
|
329
|
+
threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
330
|
+
// string (optional)
|
|
331
|
+
lastMessageId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
332
|
+
// string (optional)
|
|
333
|
+
lastEntryId: lastEntryId_example,
|
|
334
|
+
// string (optional)
|
|
335
|
+
ksUat: ksUat_example,
|
|
336
|
+
} satisfies StreamThreadRequest;
|
|
337
|
+
|
|
338
|
+
try {
|
|
339
|
+
const data = await api.streamThread(body);
|
|
340
|
+
console.log(data);
|
|
341
|
+
} catch (error) {
|
|
342
|
+
console.error(error);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Run the test
|
|
347
|
+
example().catch(console.error);
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Parameters
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
| Name | Type | Description | Notes |
|
|
354
|
+
|------------- | ------------- | ------------- | -------------|
|
|
355
|
+
| **threadId** | `string` | | [Defaults to `undefined`] |
|
|
356
|
+
| **lastMessageId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
357
|
+
| **lastEntryId** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
358
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
359
|
+
|
|
360
|
+
### Return type
|
|
361
|
+
|
|
362
|
+
`void` (Empty response body)
|
|
363
|
+
|
|
364
|
+
### Authorization
|
|
365
|
+
|
|
366
|
+
No authorization required
|
|
367
|
+
|
|
368
|
+
### HTTP request headers
|
|
369
|
+
|
|
370
|
+
- **Content-Type**: Not defined
|
|
371
|
+
- **Accept**: `application/json`
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### HTTP response details
|
|
375
|
+
| Status code | Description | Response headers |
|
|
376
|
+
|-------------|-------------|------------------|
|
|
377
|
+
| **200** | Successful Response | - |
|
|
378
|
+
| **422** | Validation Error | - |
|
|
379
|
+
|
|
380
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
## updateThread
|
|
384
|
+
|
|
385
|
+
> ThreadResponse updateThread(threadId, updateThreadRequest, ksUat)
|
|
386
|
+
|
|
387
|
+
Update Thread Handler
|
|
388
|
+
|
|
389
|
+
Update a thread\'s title and/or parent_thread_id.
|
|
390
|
+
|
|
391
|
+
### Example
|
|
392
|
+
|
|
393
|
+
```ts
|
|
394
|
+
import {
|
|
395
|
+
Configuration,
|
|
396
|
+
ThreadsApi,
|
|
397
|
+
} from '@knowledge-stack/ksapi';
|
|
398
|
+
import type { UpdateThreadOperationRequest } from '@knowledge-stack/ksapi';
|
|
399
|
+
|
|
400
|
+
async function example() {
|
|
401
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
402
|
+
const api = new ThreadsApi();
|
|
403
|
+
|
|
404
|
+
const body = {
|
|
405
|
+
// string
|
|
406
|
+
threadId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
407
|
+
// UpdateThreadRequest
|
|
408
|
+
updateThreadRequest: ...,
|
|
409
|
+
// string (optional)
|
|
410
|
+
ksUat: ksUat_example,
|
|
411
|
+
} satisfies UpdateThreadOperationRequest;
|
|
412
|
+
|
|
413
|
+
try {
|
|
414
|
+
const data = await api.updateThread(body);
|
|
415
|
+
console.log(data);
|
|
416
|
+
} catch (error) {
|
|
417
|
+
console.error(error);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Run the test
|
|
422
|
+
example().catch(console.error);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Parameters
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
| Name | Type | Description | Notes |
|
|
429
|
+
|------------- | ------------- | ------------- | -------------|
|
|
430
|
+
| **threadId** | `string` | | [Defaults to `undefined`] |
|
|
431
|
+
| **updateThreadRequest** | [UpdateThreadRequest](UpdateThreadRequest.md) | | |
|
|
432
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
433
|
+
|
|
434
|
+
### Return type
|
|
435
|
+
|
|
436
|
+
[**ThreadResponse**](ThreadResponse.md)
|
|
437
|
+
|
|
438
|
+
### Authorization
|
|
439
|
+
|
|
440
|
+
No authorization required
|
|
441
|
+
|
|
442
|
+
### HTTP request headers
|
|
443
|
+
|
|
444
|
+
- **Content-Type**: `application/json`
|
|
445
|
+
- **Accept**: `application/json`
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
### HTTP response details
|
|
449
|
+
| Status code | Description | Response headers |
|
|
450
|
+
|-------------|-------------|------------------|
|
|
451
|
+
| **200** | Successful Response | - |
|
|
452
|
+
| **422** | Validation Error | - |
|
|
453
|
+
|
|
454
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
455
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateChunkContentRequest
|
|
3
|
+
|
|
4
|
+
Request to update chunk content (creates new content row).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`content` | string
|
|
11
|
+
`chunkType` | [ChunkType](ChunkType.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { UpdateChunkContentRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"content": null,
|
|
21
|
+
"chunkType": null,
|
|
22
|
+
} satisfies UpdateChunkContentRequest
|
|
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 UpdateChunkContentRequest
|
|
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,35 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateChunkMetadataRequest
|
|
3
|
+
|
|
4
|
+
Request to update chunk metadata (merge).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`chunkMetadata` | [ChunkMetadataInput](ChunkMetadataInput.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UpdateChunkMetadataRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"chunkMetadata": null,
|
|
20
|
+
} satisfies UpdateChunkMetadataRequest
|
|
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 UpdateChunkMetadataRequest
|
|
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,39 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateDocumentRequest
|
|
3
|
+
|
|
4
|
+
Request to update a document (rename, move, and/or change active version).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`parentPathPartId` | string
|
|
12
|
+
`activeVersionId` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { UpdateDocumentRequest } from '@knowledge-stack/ksapi'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"parentPathPartId": null,
|
|
23
|
+
"activeVersionId": null,
|
|
24
|
+
} satisfies UpdateDocumentRequest
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as UpdateDocumentRequest
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateFolderRequest
|
|
3
|
+
|
|
4
|
+
Request to update a folder (rename and/or move).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`parentPathPartId` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { UpdateFolderRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"name": null,
|
|
21
|
+
"parentPathPartId": null,
|
|
22
|
+
} satisfies UpdateFolderRequest
|
|
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 UpdateFolderRequest
|
|
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
|
+
# UpdatePermissionRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`pathPartId` | string
|
|
10
|
+
`capability` | [PermissionCapability](PermissionCapability.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { UpdatePermissionRequest } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"pathPartId": null,
|
|
20
|
+
"capability": null,
|
|
21
|
+
} satisfies UpdatePermissionRequest
|
|
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 UpdatePermissionRequest
|
|
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,41 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateSectionRequest
|
|
3
|
+
|
|
4
|
+
Request to update a section.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`name` | string
|
|
11
|
+
`pageNumber` | number
|
|
12
|
+
`prevSiblingPathId` | string
|
|
13
|
+
`moveToHead` | boolean
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { UpdateSectionRequest } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"name": null,
|
|
23
|
+
"pageNumber": null,
|
|
24
|
+
"prevSiblingPathId": null,
|
|
25
|
+
"moveToHead": null,
|
|
26
|
+
} satisfies UpdateSectionRequest
|
|
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 UpdateSectionRequest
|
|
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
|
+
|