@knowledge-stack/ksapi 1.72.4 → 1.78.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 +36 -4
- package/README.md +33 -11
- package/dist/apis/AgentApi.d.ts +114 -0
- package/dist/apis/AgentApi.js +156 -0
- package/dist/apis/ChunksApi.d.ts +19 -16
- package/dist/apis/ChunksApi.js +9 -6
- package/dist/apis/DocumentsApi.d.ts +4 -4
- package/dist/apis/DocumentsApi.js +2 -2
- package/dist/apis/FoldersApi.d.ts +4 -4
- package/dist/apis/FoldersApi.js +2 -2
- package/dist/apis/InvitesApi.d.ts +54 -7
- package/dist/apis/InvitesApi.js +51 -2
- package/dist/apis/PublicApi.d.ts +59 -0
- package/dist/apis/PublicApi.js +103 -0
- package/dist/apis/SubscriptionsApi.d.ts +120 -0
- package/dist/apis/SubscriptionsApi.js +162 -0
- package/dist/apis/TenantsApi.d.ts +45 -1
- package/dist/apis/TenantsApi.js +44 -0
- package/dist/apis/ThreadsApi.d.ts +4 -4
- package/dist/apis/ThreadsApi.js +2 -2
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AgentApi.d.ts +114 -0
- package/dist/esm/apis/AgentApi.js +119 -0
- package/dist/esm/apis/ChunksApi.d.ts +19 -16
- package/dist/esm/apis/ChunksApi.js +9 -6
- package/dist/esm/apis/DocumentsApi.d.ts +4 -4
- package/dist/esm/apis/DocumentsApi.js +2 -2
- package/dist/esm/apis/FoldersApi.d.ts +4 -4
- package/dist/esm/apis/FoldersApi.js +2 -2
- package/dist/esm/apis/InvitesApi.d.ts +54 -7
- package/dist/esm/apis/InvitesApi.js +52 -3
- package/dist/esm/apis/PublicApi.d.ts +59 -0
- package/dist/esm/apis/PublicApi.js +66 -0
- package/dist/esm/apis/SubscriptionsApi.d.ts +120 -0
- package/dist/esm/apis/SubscriptionsApi.js +125 -0
- package/dist/esm/apis/TenantsApi.d.ts +45 -1
- package/dist/esm/apis/TenantsApi.js +45 -1
- package/dist/esm/apis/ThreadsApi.d.ts +4 -4
- package/dist/esm/apis/ThreadsApi.js +2 -2
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AcceptInviteResponse.d.ts +6 -0
- package/dist/esm/models/AcceptInviteResponse.js +2 -0
- package/dist/esm/models/AskRequest.d.ts +47 -0
- package/dist/esm/models/AskRequest.js +44 -0
- package/dist/esm/models/AskResponse.d.ts +47 -0
- package/dist/esm/models/AskResponse.js +44 -0
- package/dist/esm/models/ChangeSubscriptionRequest.d.ts +53 -0
- package/dist/esm/models/ChangeSubscriptionRequest.js +53 -0
- package/dist/esm/models/CheckpointDetails.d.ts +96 -0
- package/dist/esm/models/CheckpointDetails.js +91 -0
- package/dist/esm/models/ChunkBulkResponse.d.ts +3 -3
- package/dist/esm/models/ChunkBulkResponse.js +3 -3
- package/dist/esm/models/ChunkContentItem.d.ts +3 -3
- package/dist/esm/models/ChunkContentItem.js +3 -3
- package/dist/esm/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
- package/dist/esm/models/{ChunkMetadataInput.js → ChunkMetadata.js} +9 -9
- package/dist/esm/models/ChunkNeighborsResponse.d.ts +18 -0
- package/dist/esm/models/ChunkNeighborsResponse.js +10 -0
- package/dist/esm/models/ChunkResponse.d.ts +3 -3
- package/dist/esm/models/ChunkResponse.js +3 -3
- package/dist/esm/models/CreateChunkRequest.d.ts +3 -3
- package/dist/esm/models/CreateChunkRequest.js +3 -3
- package/dist/esm/models/DocumentResponse.d.ts +6 -0
- package/dist/esm/models/DocumentResponse.js +4 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +24 -0
- package/dist/esm/models/DocumentVersionMetadata.js +8 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +24 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +8 -0
- package/dist/esm/models/ExtractRequest.d.ts +61 -0
- package/dist/esm/models/ExtractRequest.js +48 -0
- package/dist/esm/models/ExtractResponse.d.ts +49 -0
- package/dist/esm/models/ExtractResponse.js +44 -0
- package/dist/esm/models/FeaturesResponse.d.ts +12 -0
- package/dist/esm/models/FeaturesResponse.js +8 -0
- package/dist/esm/models/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +4 -0
- package/dist/esm/models/IdpType.d.ts +2 -0
- package/dist/esm/models/IdpType.js +2 -0
- package/dist/esm/models/InviteLinkSettingsRequest.d.ts +70 -0
- package/dist/esm/models/InviteLinkSettingsRequest.js +58 -0
- package/dist/esm/models/InviteLinkSettingsResponse.d.ts +67 -0
- package/dist/esm/models/InviteLinkSettingsResponse.js +57 -0
- package/dist/esm/models/InviteResponse.d.ts +6 -0
- package/dist/esm/models/InviteResponse.js +2 -0
- package/dist/esm/models/InviteUserRequest.d.ts +6 -0
- package/dist/esm/models/InviteUserRequest.js +8 -1
- package/dist/esm/models/LineageNodeResponse.d.ts +3 -3
- package/dist/esm/models/LineageNodeResponse.js +3 -3
- package/dist/esm/models/MeteredQuotaStatus.d.ts +72 -0
- package/dist/esm/models/MeteredQuotaStatus.js +61 -0
- package/dist/esm/models/PathPartAncestorItem.d.ts +6 -0
- package/dist/esm/models/PathPartAncestorItem.js +4 -0
- package/dist/esm/models/PathPartResponse.d.ts +6 -0
- package/dist/esm/models/PathPartResponse.js +4 -0
- package/dist/esm/models/PipelineStatus.d.ts +1 -0
- package/dist/esm/models/PipelineStatus.js +2 -1
- package/dist/esm/models/ScoredChunkResponse.d.ts +3 -3
- package/dist/esm/models/ScoredChunkResponse.js +3 -3
- package/dist/esm/models/SeatQuotaStatus.d.ts +55 -0
- package/dist/esm/models/SeatQuotaStatus.js +48 -0
- package/dist/esm/models/SubscriptionPlanResponse.d.ts +101 -0
- package/dist/esm/models/SubscriptionPlanResponse.js +76 -0
- package/dist/esm/models/TenantQuotaStateResponse.d.ts +55 -0
- package/dist/esm/models/TenantQuotaStateResponse.js +50 -0
- package/dist/esm/models/TenantResponse.d.ts +12 -0
- package/dist/esm/models/TenantResponse.js +14 -1
- package/dist/esm/models/TenantSettingsResponse.d.ts +7 -0
- package/dist/esm/models/TenantSettingsResponse.js +5 -0
- package/dist/esm/models/TenantSettingsUpdate.d.ts +7 -0
- package/dist/esm/models/TenantSettingsUpdate.js +3 -0
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +7 -0
- package/dist/esm/models/ThreadMessageDetailsInput.js +3 -0
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +7 -0
- package/dist/esm/models/ThreadMessageDetailsOutput.js +3 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +3 -3
- package/dist/esm/models/UpdateChunkMetadataRequest.js +3 -3
- package/dist/esm/models/UpdateDocumentRequest.d.ts +7 -1
- package/dist/esm/models/UpdateDocumentRequest.js +2 -0
- package/dist/esm/models/UpdateFolderRequest.d.ts +7 -1
- package/dist/esm/models/UpdateFolderRequest.js +2 -0
- package/dist/esm/models/UpdateInviteRequest.d.ts +53 -0
- package/dist/esm/models/UpdateInviteRequest.js +49 -0
- package/dist/esm/models/UsageMetric.d.ts +26 -0
- package/dist/esm/models/UsageMetric.js +44 -0
- package/dist/esm/models/index.d.ts +15 -2
- package/dist/esm/models/index.js +15 -2
- package/dist/models/AcceptInviteResponse.d.ts +6 -0
- package/dist/models/AcceptInviteResponse.js +2 -0
- package/dist/models/AskRequest.d.ts +47 -0
- package/dist/models/AskRequest.js +52 -0
- package/dist/models/AskResponse.d.ts +47 -0
- package/dist/models/AskResponse.js +52 -0
- package/dist/models/ChangeSubscriptionRequest.d.ts +53 -0
- package/dist/models/ChangeSubscriptionRequest.js +61 -0
- package/dist/models/CheckpointDetails.d.ts +96 -0
- package/dist/models/CheckpointDetails.js +99 -0
- package/dist/models/ChunkBulkResponse.d.ts +3 -3
- package/dist/models/ChunkBulkResponse.js +3 -3
- package/dist/models/ChunkContentItem.d.ts +3 -3
- package/dist/models/ChunkContentItem.js +3 -3
- package/dist/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
- package/dist/models/{ChunkMetadataInput.js → ChunkMetadata.js} +15 -15
- package/dist/models/ChunkNeighborsResponse.d.ts +18 -0
- package/dist/models/ChunkNeighborsResponse.js +10 -0
- package/dist/models/ChunkResponse.d.ts +3 -3
- package/dist/models/ChunkResponse.js +3 -3
- package/dist/models/CreateChunkRequest.d.ts +3 -3
- package/dist/models/CreateChunkRequest.js +3 -3
- package/dist/models/DocumentResponse.d.ts +6 -0
- package/dist/models/DocumentResponse.js +4 -0
- package/dist/models/DocumentVersionMetadata.d.ts +24 -0
- package/dist/models/DocumentVersionMetadata.js +8 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +24 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +8 -0
- package/dist/models/ExtractRequest.d.ts +61 -0
- package/dist/models/ExtractRequest.js +56 -0
- package/dist/models/ExtractResponse.d.ts +49 -0
- package/dist/models/ExtractResponse.js +52 -0
- package/dist/models/FeaturesResponse.d.ts +12 -0
- package/dist/models/FeaturesResponse.js +8 -0
- package/dist/models/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +4 -0
- package/dist/models/IdpType.d.ts +2 -0
- package/dist/models/IdpType.js +2 -0
- package/dist/models/InviteLinkSettingsRequest.d.ts +70 -0
- package/dist/models/InviteLinkSettingsRequest.js +66 -0
- package/dist/models/InviteLinkSettingsResponse.d.ts +67 -0
- package/dist/models/InviteLinkSettingsResponse.js +65 -0
- package/dist/models/InviteResponse.d.ts +6 -0
- package/dist/models/InviteResponse.js +2 -0
- package/dist/models/InviteUserRequest.d.ts +6 -0
- package/dist/models/InviteUserRequest.js +8 -1
- package/dist/models/LineageNodeResponse.d.ts +3 -3
- package/dist/models/LineageNodeResponse.js +3 -3
- package/dist/models/MeteredQuotaStatus.d.ts +72 -0
- package/dist/models/MeteredQuotaStatus.js +69 -0
- package/dist/models/PathPartAncestorItem.d.ts +6 -0
- package/dist/models/PathPartAncestorItem.js +4 -0
- package/dist/models/PathPartResponse.d.ts +6 -0
- package/dist/models/PathPartResponse.js +4 -0
- package/dist/models/PipelineStatus.d.ts +1 -0
- package/dist/models/PipelineStatus.js +2 -1
- package/dist/models/ScoredChunkResponse.d.ts +3 -3
- package/dist/models/ScoredChunkResponse.js +3 -3
- package/dist/models/SeatQuotaStatus.d.ts +55 -0
- package/dist/models/SeatQuotaStatus.js +56 -0
- package/dist/models/SubscriptionPlanResponse.d.ts +101 -0
- package/dist/models/SubscriptionPlanResponse.js +84 -0
- package/dist/models/TenantQuotaStateResponse.d.ts +55 -0
- package/dist/models/TenantQuotaStateResponse.js +58 -0
- package/dist/models/TenantResponse.d.ts +12 -0
- package/dist/models/TenantResponse.js +14 -1
- package/dist/models/TenantSettingsResponse.d.ts +7 -0
- package/dist/models/TenantSettingsResponse.js +5 -0
- package/dist/models/TenantSettingsUpdate.d.ts +7 -0
- package/dist/models/TenantSettingsUpdate.js +3 -0
- package/dist/models/ThreadMessageDetailsInput.d.ts +7 -0
- package/dist/models/ThreadMessageDetailsInput.js +3 -0
- package/dist/models/ThreadMessageDetailsOutput.d.ts +7 -0
- package/dist/models/ThreadMessageDetailsOutput.js +3 -0
- package/dist/models/UpdateChunkMetadataRequest.d.ts +3 -3
- package/dist/models/UpdateChunkMetadataRequest.js +3 -3
- package/dist/models/UpdateDocumentRequest.d.ts +7 -1
- package/dist/models/UpdateDocumentRequest.js +2 -0
- package/dist/models/UpdateFolderRequest.d.ts +7 -1
- package/dist/models/UpdateFolderRequest.js +2 -0
- package/dist/models/UpdateInviteRequest.d.ts +53 -0
- package/dist/models/UpdateInviteRequest.js +57 -0
- package/dist/models/UsageMetric.d.ts +26 -0
- package/dist/models/UsageMetric.js +52 -0
- package/dist/models/index.d.ts +15 -2
- package/dist/models/index.js +15 -2
- package/docs/AcceptInviteResponse.md +2 -0
- package/docs/AgentApi.md +158 -0
- package/docs/AskRequest.md +35 -0
- package/docs/AskResponse.md +35 -0
- package/docs/AuthApi.md +2 -2
- package/docs/ChangeSubscriptionRequest.md +37 -0
- package/docs/CheckpointDetails.md +49 -0
- package/docs/ChunkBulkResponse.md +1 -1
- package/docs/ChunkContentItem.md +1 -1
- package/docs/{ChunkMetadataInput.md → ChunkMetadata.md} +4 -4
- package/docs/ChunkNeighborsResponse.md +6 -0
- package/docs/ChunkResponse.md +1 -1
- package/docs/ChunksApi.md +13 -10
- package/docs/CreateChunkRequest.md +1 -1
- package/docs/DocumentResponse.md +2 -0
- package/docs/DocumentVersionMetadata.md +8 -0
- package/docs/DocumentVersionMetadataUpdate.md +8 -0
- package/docs/DocumentsApi.md +1 -1
- package/docs/ExtractRequest.md +39 -0
- package/docs/ExtractResponse.md +35 -0
- package/docs/FeaturesResponse.md +4 -0
- package/docs/FolderResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/FoldersApi.md +1 -1
- package/docs/InviteLinkSettingsRequest.md +39 -0
- package/docs/InviteLinkSettingsResponse.md +39 -0
- package/docs/InviteResponse.md +2 -0
- package/docs/InviteUserRequest.md +2 -0
- package/docs/InvitesApi.md +81 -3
- package/docs/LineageNodeResponse.md +1 -1
- package/docs/MeteredQuotaStatus.md +43 -0
- package/docs/PathPartAncestorItem.md +2 -0
- package/docs/PathPartResponse.md +2 -0
- package/docs/PublicApi.md +68 -0
- package/docs/ScoredChunkResponse.md +1 -1
- package/docs/SeatQuotaStatus.md +37 -0
- package/docs/SectionContentItemOrChunkContentItem.md +1 -1
- package/docs/SubscriptionPlanResponse.md +51 -0
- package/docs/SubscriptionsApi.md +164 -0
- package/docs/TenantQuotaStateResponse.md +37 -0
- package/docs/TenantResponse.md +4 -0
- package/docs/TenantSettingsResponse.md +2 -0
- package/docs/TenantSettingsUpdate.md +2 -0
- package/docs/TenantsApi.md +75 -0
- package/docs/ThreadMessageDetailsInput.md +2 -0
- package/docs/ThreadMessageDetailsOutput.md +2 -0
- package/docs/ThreadsApi.md +1 -1
- package/docs/UpdateChunkMetadataRequest.md +1 -1
- package/docs/UpdateDocumentRequest.md +3 -1
- package/docs/UpdateFolderRequest.md +3 -1
- package/docs/UpdateInviteRequest.md +37 -0
- package/docs/UsageMetric.md +32 -0
- package/package.json +1 -1
- package/src/apis/AgentApi.ts +225 -0
- package/src/apis/ChunksApi.ts +27 -17
- package/src/apis/DocumentsApi.ts +4 -4
- package/src/apis/FoldersApi.ts +4 -4
- package/src/apis/InvitesApi.ts +107 -6
- package/src/apis/PublicApi.ts +100 -0
- package/src/apis/SubscriptionsApi.ts +238 -0
- package/src/apis/TenantsApi.ts +88 -0
- package/src/apis/ThreadsApi.ts +4 -4
- package/src/apis/index.ts +3 -0
- package/src/models/AcceptInviteResponse.ts +8 -0
- package/src/models/AskRequest.ts +83 -0
- package/src/models/AskResponse.ts +83 -0
- package/src/models/ChangeSubscriptionRequest.ts +96 -0
- package/src/models/CheckpointDetails.ts +169 -0
- package/src/models/ChunkBulkResponse.ts +11 -11
- package/src/models/ChunkContentItem.ts +10 -10
- package/src/models/{ChunkMetadataInput.ts → ChunkMetadata.ts} +25 -25
- package/src/models/ChunkNeighborsResponse.ts +26 -0
- package/src/models/ChunkResponse.ts +11 -11
- package/src/models/CreateChunkRequest.ts +10 -10
- package/src/models/DocumentResponse.ts +9 -0
- package/src/models/DocumentVersionMetadata.ts +32 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +32 -0
- package/src/models/ExtractRequest.ts +99 -0
- package/src/models/ExtractResponse.ts +83 -0
- package/src/models/FeaturesResponse.ts +18 -0
- package/src/models/FolderResponse.ts +9 -0
- package/src/models/IdpType.ts +2 -0
- package/src/models/InviteLinkSettingsRequest.ts +116 -0
- package/src/models/InviteLinkSettingsResponse.ts +111 -0
- package/src/models/InviteResponse.ts +8 -0
- package/src/models/InviteUserRequest.ts +12 -0
- package/src/models/LineageNodeResponse.ts +10 -10
- package/src/models/MeteredQuotaStatus.ts +129 -0
- package/src/models/PathPartAncestorItem.ts +9 -0
- package/src/models/PathPartResponse.ts +9 -0
- package/src/models/PipelineStatus.ts +2 -1
- package/src/models/ScoredChunkResponse.ts +11 -11
- package/src/models/SeatQuotaStatus.ts +94 -0
- package/src/models/SubscriptionPlanResponse.ts +161 -0
- package/src/models/TenantQuotaStateResponse.ts +107 -0
- package/src/models/TenantResponse.ts +22 -0
- package/src/models/TenantSettingsResponse.ts +16 -0
- package/src/models/TenantSettingsUpdate.ts +15 -0
- package/src/models/ThreadMessageDetailsInput.ts +15 -0
- package/src/models/ThreadMessageDetailsOutput.ts +15 -0
- package/src/models/UpdateChunkMetadataRequest.ts +10 -10
- package/src/models/UpdateDocumentRequest.ts +9 -1
- package/src/models/UpdateFolderRequest.ts +9 -1
- package/src/models/UpdateInviteRequest.ts +94 -0
- package/src/models/UsageMetric.ts +54 -0
- package/src/models/index.ts +15 -2
- package/dist/esm/models/ChunkMetadataOutput.d.ts +0 -135
- package/dist/esm/models/ChunkMetadataOutput.js +0 -70
- package/dist/models/ChunkMetadataOutput.d.ts +0 -135
- package/dist/models/ChunkMetadataOutput.js +0 -78
- package/docs/ChunkMetadataOutput.md +0 -61
- package/src/models/ChunkMetadataOutput.ts +0 -203
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# PublicApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**listPublicSubscriptions**](PublicApi.md#listpublicsubscriptions) | **GET** /public/subscriptions | List Public Subscriptions Handler |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## listPublicSubscriptions
|
|
12
|
+
|
|
13
|
+
> Array<SubscriptionPlanResponse> listPublicSubscriptions()
|
|
14
|
+
|
|
15
|
+
List Public Subscriptions Handler
|
|
16
|
+
|
|
17
|
+
List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
Configuration,
|
|
24
|
+
PublicApi,
|
|
25
|
+
} from '@knowledge-stack/ksapi';
|
|
26
|
+
import type { ListPublicSubscriptionsRequest } from '@knowledge-stack/ksapi';
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
30
|
+
const api = new PublicApi();
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const data = await api.listPublicSubscriptions();
|
|
34
|
+
console.log(data);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error(error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Run the test
|
|
41
|
+
example().catch(console.error);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Parameters
|
|
45
|
+
|
|
46
|
+
This endpoint does not need any parameter.
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
[**Array<SubscriptionPlanResponse>**](SubscriptionPlanResponse.md)
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
No authorization required
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: Not defined
|
|
59
|
+
- **Accept**: `application/json`
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
| **200** | Successful Response | - |
|
|
66
|
+
|
|
67
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
68
|
+
|
|
@@ -12,7 +12,7 @@ Name | Type
|
|
|
12
12
|
`contentId` | string
|
|
13
13
|
`content` | string
|
|
14
14
|
`chunkType` | [ChunkType](ChunkType.md)
|
|
15
|
-
`chunkMetadata` | [
|
|
15
|
+
`chunkMetadata` | [ChunkMetadata](ChunkMetadata.md)
|
|
16
16
|
`numTokens` | number
|
|
17
17
|
`parentPathId` | string
|
|
18
18
|
`prevSiblingPathId` | string
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# SeatQuotaStatus
|
|
3
|
+
|
|
4
|
+
Live seat count for the tenant. ``used`` is the number of active (non-deactivated) ``TenantUser`` rows.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`used` | number
|
|
11
|
+
`limit` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { SeatQuotaStatus } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"used": null,
|
|
21
|
+
"limit": null,
|
|
22
|
+
} satisfies SeatQuotaStatus
|
|
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 SeatQuotaStatus
|
|
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,51 @@
|
|
|
1
|
+
|
|
2
|
+
# SubscriptionPlanResponse
|
|
3
|
+
|
|
4
|
+
Public-facing plan description. Surfaced via ``GET /public/subscriptions`` (unauth) so the FE can render the upgrade page even before sign-in. Field names line up 1:1 with ``SubscriptionPlan`` ORM attributes; callers build the response via ``SubscriptionPlanResponse.model_validate(plan)`` (``BaseResponse`` enables ``from_attributes=True``).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`ingestedPages` | number
|
|
13
|
+
`messages` | number
|
|
14
|
+
`searches` | number
|
|
15
|
+
`maxSeats` | number
|
|
16
|
+
`_public` | boolean
|
|
17
|
+
`createdAt` | Date
|
|
18
|
+
`updatedAt` | Date
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { SubscriptionPlanResponse } from '@knowledge-stack/ksapi'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"name": null,
|
|
29
|
+
"ingestedPages": null,
|
|
30
|
+
"messages": null,
|
|
31
|
+
"searches": null,
|
|
32
|
+
"maxSeats": null,
|
|
33
|
+
"_public": null,
|
|
34
|
+
"createdAt": null,
|
|
35
|
+
"updatedAt": null,
|
|
36
|
+
} satisfies SubscriptionPlanResponse
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubscriptionPlanResponse
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# SubscriptionsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**changeTenantSubscription**](SubscriptionsApi.md#changetenantsubscription) | **POST** /v1/tenants/{tenant_id}/subscriptions | Change Tenant Subscription Handler |
|
|
8
|
+
| [**getTenantSubscription**](SubscriptionsApi.md#gettenantsubscription) | **GET** /v1/tenants/{tenant_id}/subscriptions | Get Tenant Subscription Handler |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## changeTenantSubscription
|
|
13
|
+
|
|
14
|
+
> TenantResponse changeTenantSubscription(tenantId, changeSubscriptionRequest, idempotencyKey, authorization, ksUat)
|
|
15
|
+
|
|
16
|
+
Change Tenant Subscription Handler
|
|
17
|
+
|
|
18
|
+
Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
SubscriptionsApi,
|
|
26
|
+
} from '@knowledge-stack/ksapi';
|
|
27
|
+
import type { ChangeTenantSubscriptionRequest } from '@knowledge-stack/ksapi';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
31
|
+
const api = new SubscriptionsApi();
|
|
32
|
+
|
|
33
|
+
const body = {
|
|
34
|
+
// string
|
|
35
|
+
tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
36
|
+
// ChangeSubscriptionRequest
|
|
37
|
+
changeSubscriptionRequest: ...,
|
|
38
|
+
// string (optional)
|
|
39
|
+
idempotencyKey: idempotencyKey_example,
|
|
40
|
+
// string (optional)
|
|
41
|
+
authorization: authorization_example,
|
|
42
|
+
// string (optional)
|
|
43
|
+
ksUat: ksUat_example,
|
|
44
|
+
} satisfies ChangeTenantSubscriptionRequest;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const data = await api.changeTenantSubscription(body);
|
|
48
|
+
console.log(data);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Run the test
|
|
55
|
+
example().catch(console.error);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
| Name | Type | Description | Notes |
|
|
62
|
+
|------------- | ------------- | ------------- | -------------|
|
|
63
|
+
| **tenantId** | `string` | | [Defaults to `undefined`] |
|
|
64
|
+
| **changeSubscriptionRequest** | [ChangeSubscriptionRequest](ChangeSubscriptionRequest.md) | | |
|
|
65
|
+
| **idempotencyKey** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
66
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
67
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
68
|
+
|
|
69
|
+
### Return type
|
|
70
|
+
|
|
71
|
+
[**TenantResponse**](TenantResponse.md)
|
|
72
|
+
|
|
73
|
+
### Authorization
|
|
74
|
+
|
|
75
|
+
No authorization required
|
|
76
|
+
|
|
77
|
+
### HTTP request headers
|
|
78
|
+
|
|
79
|
+
- **Content-Type**: `application/json`
|
|
80
|
+
- **Accept**: `application/json`
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### HTTP response details
|
|
84
|
+
| Status code | Description | Response headers |
|
|
85
|
+
|-------------|-------------|------------------|
|
|
86
|
+
| **200** | Successful Response | - |
|
|
87
|
+
| **422** | Validation Error | - |
|
|
88
|
+
|
|
89
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## getTenantSubscription
|
|
93
|
+
|
|
94
|
+
> SubscriptionPlanResponse getTenantSubscription(tenantId, authorization, ksUat)
|
|
95
|
+
|
|
96
|
+
Get Tenant Subscription Handler
|
|
97
|
+
|
|
98
|
+
Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
99
|
+
|
|
100
|
+
### Example
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import {
|
|
104
|
+
Configuration,
|
|
105
|
+
SubscriptionsApi,
|
|
106
|
+
} from '@knowledge-stack/ksapi';
|
|
107
|
+
import type { GetTenantSubscriptionRequest } from '@knowledge-stack/ksapi';
|
|
108
|
+
|
|
109
|
+
async function example() {
|
|
110
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
111
|
+
const api = new SubscriptionsApi();
|
|
112
|
+
|
|
113
|
+
const body = {
|
|
114
|
+
// string
|
|
115
|
+
tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
116
|
+
// string (optional)
|
|
117
|
+
authorization: authorization_example,
|
|
118
|
+
// string (optional)
|
|
119
|
+
ksUat: ksUat_example,
|
|
120
|
+
} satisfies GetTenantSubscriptionRequest;
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
const data = await api.getTenantSubscription(body);
|
|
124
|
+
console.log(data);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error(error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Run the test
|
|
131
|
+
example().catch(console.error);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description | Notes |
|
|
138
|
+
|------------- | ------------- | ------------- | -------------|
|
|
139
|
+
| **tenantId** | `string` | | [Defaults to `undefined`] |
|
|
140
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
141
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
142
|
+
|
|
143
|
+
### Return type
|
|
144
|
+
|
|
145
|
+
[**SubscriptionPlanResponse**](SubscriptionPlanResponse.md)
|
|
146
|
+
|
|
147
|
+
### Authorization
|
|
148
|
+
|
|
149
|
+
No authorization required
|
|
150
|
+
|
|
151
|
+
### HTTP request headers
|
|
152
|
+
|
|
153
|
+
- **Content-Type**: Not defined
|
|
154
|
+
- **Accept**: `application/json`
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### HTTP response details
|
|
158
|
+
| Status code | Description | Response headers |
|
|
159
|
+
|-------------|-------------|------------------|
|
|
160
|
+
| **200** | Successful Response | - |
|
|
161
|
+
| **422** | Validation Error | - |
|
|
162
|
+
|
|
163
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
164
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# TenantQuotaStateResponse
|
|
3
|
+
|
|
4
|
+
Tenant\'s current quota state across all enforced caps.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`metered` | [Array<MeteredQuotaStatus>](MeteredQuotaStatus.md)
|
|
11
|
+
`seats` | [SeatQuotaStatus](SeatQuotaStatus.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { TenantQuotaStateResponse } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"metered": null,
|
|
21
|
+
"seats": null,
|
|
22
|
+
} satisfies TenantQuotaStateResponse
|
|
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 TenantQuotaStateResponse
|
|
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
|
+
|
package/docs/TenantResponse.md
CHANGED
|
@@ -12,6 +12,8 @@ Name | Type
|
|
|
12
12
|
`idpConfig` | { [key: string]: any; }
|
|
13
13
|
`settings` | [TenantSettingsResponse](TenantSettingsResponse.md)
|
|
14
14
|
`branding` | [TenantBrandingResponse](TenantBrandingResponse.md)
|
|
15
|
+
`seats` | number
|
|
16
|
+
`subscriptionId` | string
|
|
15
17
|
|
|
16
18
|
## Example
|
|
17
19
|
|
|
@@ -25,6 +27,8 @@ const example = {
|
|
|
25
27
|
"idpConfig": null,
|
|
26
28
|
"settings": null,
|
|
27
29
|
"branding": null,
|
|
30
|
+
"seats": null,
|
|
31
|
+
"subscriptionId": null,
|
|
28
32
|
} satisfies TenantResponse
|
|
29
33
|
|
|
30
34
|
console.log(example)
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`language` | [SupportedLanguage](SupportedLanguage.md)
|
|
11
11
|
`description` | string
|
|
12
12
|
`timezone` | string
|
|
13
|
+
`inviteLink` | [InviteLinkSettingsResponse](InviteLinkSettingsResponse.md)
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"language": null,
|
|
22
23
|
"description": null,
|
|
23
24
|
"timezone": null,
|
|
25
|
+
"inviteLink": null,
|
|
24
26
|
} satisfies TenantSettingsResponse
|
|
25
27
|
|
|
26
28
|
console.log(example)
|
|
@@ -13,6 +13,7 @@ Name | Type
|
|
|
13
13
|
`brandName` | string
|
|
14
14
|
`brandColor` | string
|
|
15
15
|
`themeOverrides` | { [key: string]: string; }
|
|
16
|
+
`inviteLink` | [InviteLinkSettingsRequest](InviteLinkSettingsRequest.md)
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
|
@@ -27,6 +28,7 @@ const example = {
|
|
|
27
28
|
"brandName": null,
|
|
28
29
|
"brandColor": null,
|
|
29
30
|
"themeOverrides": null,
|
|
31
|
+
"inviteLink": null,
|
|
30
32
|
} satisfies TenantSettingsUpdate
|
|
31
33
|
|
|
32
34
|
console.log(example)
|
package/docs/TenantsApi.md
CHANGED
|
@@ -10,6 +10,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
10
10
|
| [**deleteTenantLogo**](TenantsApi.md#deletetenantlogo) | **DELETE** /v1/tenants/{tenant_id}/branding/logo | Delete Tenant Logo |
|
|
11
11
|
| [**deleteTenantUser**](TenantsApi.md#deletetenantuser) | **DELETE** /v1/tenants/{tenant_id}/users/{user_id} | Delete Tenant User Handler |
|
|
12
12
|
| [**getTenant**](TenantsApi.md#gettenant) | **GET** /v1/tenants/{tenant_id} | Get Tenant |
|
|
13
|
+
| [**getTenantQuotaState**](TenantsApi.md#gettenantquotastate) | **GET** /v1/tenants/{tenant_id}/quota | Get Tenant Quota State Handler |
|
|
13
14
|
| [**listTenantUsers**](TenantsApi.md#listtenantusers) | **GET** /v1/tenants/{tenant_id}/users | List Tenant Users |
|
|
14
15
|
| [**listTenants**](TenantsApi.md#listtenants) | **GET** /v1/tenants | List Tenants |
|
|
15
16
|
| [**updateTenant**](TenantsApi.md#updatetenantoperation) | **PATCH** /v1/tenants/{tenant_id} | Update Tenant |
|
|
@@ -474,6 +475,80 @@ No authorization required
|
|
|
474
475
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
475
476
|
|
|
476
477
|
|
|
478
|
+
## getTenantQuotaState
|
|
479
|
+
|
|
480
|
+
> TenantQuotaStateResponse getTenantQuotaState(tenantId, authorization, ksUat)
|
|
481
|
+
|
|
482
|
+
Get Tenant Quota State Handler
|
|
483
|
+
|
|
484
|
+
Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
|
|
485
|
+
|
|
486
|
+
### Example
|
|
487
|
+
|
|
488
|
+
```ts
|
|
489
|
+
import {
|
|
490
|
+
Configuration,
|
|
491
|
+
TenantsApi,
|
|
492
|
+
} from '@knowledge-stack/ksapi';
|
|
493
|
+
import type { GetTenantQuotaStateRequest } from '@knowledge-stack/ksapi';
|
|
494
|
+
|
|
495
|
+
async function example() {
|
|
496
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
497
|
+
const api = new TenantsApi();
|
|
498
|
+
|
|
499
|
+
const body = {
|
|
500
|
+
// string
|
|
501
|
+
tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
502
|
+
// string (optional)
|
|
503
|
+
authorization: authorization_example,
|
|
504
|
+
// string (optional)
|
|
505
|
+
ksUat: ksUat_example,
|
|
506
|
+
} satisfies GetTenantQuotaStateRequest;
|
|
507
|
+
|
|
508
|
+
try {
|
|
509
|
+
const data = await api.getTenantQuotaState(body);
|
|
510
|
+
console.log(data);
|
|
511
|
+
} catch (error) {
|
|
512
|
+
console.error(error);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// Run the test
|
|
517
|
+
example().catch(console.error);
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Parameters
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
| Name | Type | Description | Notes |
|
|
524
|
+
|------------- | ------------- | ------------- | -------------|
|
|
525
|
+
| **tenantId** | `string` | | [Defaults to `undefined`] |
|
|
526
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
527
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
528
|
+
|
|
529
|
+
### Return type
|
|
530
|
+
|
|
531
|
+
[**TenantQuotaStateResponse**](TenantQuotaStateResponse.md)
|
|
532
|
+
|
|
533
|
+
### Authorization
|
|
534
|
+
|
|
535
|
+
No authorization required
|
|
536
|
+
|
|
537
|
+
### HTTP request headers
|
|
538
|
+
|
|
539
|
+
- **Content-Type**: Not defined
|
|
540
|
+
- **Accept**: `application/json`
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
### HTTP response details
|
|
544
|
+
| Status code | Description | Response headers |
|
|
545
|
+
|-------------|-------------|------------------|
|
|
546
|
+
| **200** | Successful Response | - |
|
|
547
|
+
| **422** | Validation Error | - |
|
|
548
|
+
|
|
549
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
550
|
+
|
|
551
|
+
|
|
477
552
|
## listTenantUsers
|
|
478
553
|
|
|
479
554
|
> PaginatedResponseTenantUserResponse listTenantUsers(tenantId, limit, offset, authorization, ksUat)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`steps` | [Array<StepInput>](StepInput.md)
|
|
10
|
+
`checkpoint` | [CheckpointDetails](CheckpointDetails.md)
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ import type { ThreadMessageDetailsInput } from '@knowledge-stack/ksapi'
|
|
|
16
17
|
// TODO: Update the object below with actual values
|
|
17
18
|
const example = {
|
|
18
19
|
"steps": null,
|
|
20
|
+
"checkpoint": null,
|
|
19
21
|
} satisfies ThreadMessageDetailsInput
|
|
20
22
|
|
|
21
23
|
console.log(example)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`steps` | [Array<StepOutput>](StepOutput.md)
|
|
10
|
+
`checkpoint` | [CheckpointDetails](CheckpointDetails.md)
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ import type { ThreadMessageDetailsOutput } from '@knowledge-stack/ksapi'
|
|
|
16
17
|
// TODO: Update the object below with actual values
|
|
17
18
|
const example = {
|
|
18
19
|
"steps": null,
|
|
20
|
+
"checkpoint": null,
|
|
19
21
|
} satisfies ThreadMessageDetailsOutput
|
|
20
22
|
|
|
21
23
|
console.log(example)
|
package/docs/ThreadsApi.md
CHANGED
|
@@ -322,7 +322,7 @@ No authorization required
|
|
|
322
322
|
|
|
323
323
|
Send User Message Handler
|
|
324
324
|
|
|
325
|
-
Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
|
|
325
|
+
Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
|
|
326
326
|
|
|
327
327
|
### Example
|
|
328
328
|
|
|
@@ -7,7 +7,7 @@ Request to update chunk metadata and/or move the chunk.
|
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
|
-
`chunkMetadata` | [
|
|
10
|
+
`chunkMetadata` | [ChunkMetadata](ChunkMetadata.md)
|
|
11
11
|
`parentPathPartId` | string
|
|
12
12
|
`prevSiblingPathId` | string
|
|
13
13
|
`moveToHead` | boolean
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# UpdateDocumentRequest
|
|
3
3
|
|
|
4
|
-
Request to update a document (rename, move,
|
|
4
|
+
Request to update a document (rename, move, active version, qdrant exclusion).
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`parentPathPartId` | string
|
|
12
12
|
`activeVersionId` | string
|
|
13
|
+
`excludeFromQdrant` | boolean
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"name": null,
|
|
22
23
|
"parentPathPartId": null,
|
|
23
24
|
"activeVersionId": null,
|
|
25
|
+
"excludeFromQdrant": null,
|
|
24
26
|
} satisfies UpdateDocumentRequest
|
|
25
27
|
|
|
26
28
|
console.log(example)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# UpdateFolderRequest
|
|
3
3
|
|
|
4
|
-
Request to update a folder (rename and/or
|
|
4
|
+
Request to update a folder (rename, move, and/or change qdrant exclusion).
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`name` | string
|
|
11
11
|
`parentPathPartId` | string
|
|
12
|
+
`excludeFromQdrant` | boolean
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ import type { UpdateFolderRequest } from '@knowledge-stack/ksapi'
|
|
|
19
20
|
const example = {
|
|
20
21
|
"name": null,
|
|
21
22
|
"parentPathPartId": null,
|
|
23
|
+
"excludeFromQdrant": null,
|
|
22
24
|
} satisfies UpdateFolderRequest
|
|
23
25
|
|
|
24
26
|
console.log(example)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# UpdateInviteRequest
|
|
3
|
+
|
|
4
|
+
Partial update for an invite (admin/owner only).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`expiresAt` | Date
|
|
11
|
+
`groups` | Array<string>
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { UpdateInviteRequest } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"expiresAt": null,
|
|
21
|
+
"groups": null,
|
|
22
|
+
} satisfies UpdateInviteRequest
|
|
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 UpdateInviteRequest
|
|
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
|
+
|