@knowledge-stack/ksapi 1.72.3 → 1.77.1
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/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +4 -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/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +4 -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/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/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/FolderResponse.ts +9 -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,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { AskRequest, AskResponse, ExtractRequest, ExtractResponse } from '../models/index';
|
|
14
|
+
export interface AgentAskRequest {
|
|
15
|
+
askRequest: AskRequest;
|
|
16
|
+
authorization?: string | null;
|
|
17
|
+
ksUat?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentExtractRequest {
|
|
20
|
+
extractRequest: ExtractRequest;
|
|
21
|
+
authorization?: string | null;
|
|
22
|
+
ksUat?: string | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* AgentApi - interface
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface AgentApiInterface
|
|
29
|
+
*/
|
|
30
|
+
export interface AgentApiInterface {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for agentAsk without sending the request
|
|
33
|
+
* @param {AskRequest} askRequest
|
|
34
|
+
* @param {string} [authorization]
|
|
35
|
+
* @param {string} [ksUat]
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
* @memberof AgentApiInterface
|
|
38
|
+
*/
|
|
39
|
+
agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
|
|
40
|
+
/**
|
|
41
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
42
|
+
* @summary Agent Ask Handler
|
|
43
|
+
* @param {AskRequest} askRequest
|
|
44
|
+
* @param {string} [authorization]
|
|
45
|
+
* @param {string} [ksUat]
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
* @memberof AgentApiInterface
|
|
49
|
+
*/
|
|
50
|
+
agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
|
|
51
|
+
/**
|
|
52
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
53
|
+
* Agent Ask Handler
|
|
54
|
+
*/
|
|
55
|
+
agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for agentExtract without sending the request
|
|
58
|
+
* @param {ExtractRequest} extractRequest
|
|
59
|
+
* @param {string} [authorization]
|
|
60
|
+
* @param {string} [ksUat]
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof AgentApiInterface
|
|
63
|
+
*/
|
|
64
|
+
agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts>;
|
|
65
|
+
/**
|
|
66
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
67
|
+
* @summary Agent Extract Handler
|
|
68
|
+
* @param {ExtractRequest} extractRequest
|
|
69
|
+
* @param {string} [authorization]
|
|
70
|
+
* @param {string} [ksUat]
|
|
71
|
+
* @param {*} [options] Override http request option.
|
|
72
|
+
* @throws {RequiredError}
|
|
73
|
+
* @memberof AgentApiInterface
|
|
74
|
+
*/
|
|
75
|
+
agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>>;
|
|
76
|
+
/**
|
|
77
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
78
|
+
* Agent Extract Handler
|
|
79
|
+
*/
|
|
80
|
+
agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
*/
|
|
85
|
+
export declare class AgentApi extends runtime.BaseAPI implements AgentApiInterface {
|
|
86
|
+
/**
|
|
87
|
+
* Creates request options for agentAsk without sending the request
|
|
88
|
+
*/
|
|
89
|
+
agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
|
|
90
|
+
/**
|
|
91
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
92
|
+
* Agent Ask Handler
|
|
93
|
+
*/
|
|
94
|
+
agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
|
|
95
|
+
/**
|
|
96
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
97
|
+
* Agent Ask Handler
|
|
98
|
+
*/
|
|
99
|
+
agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
|
|
100
|
+
/**
|
|
101
|
+
* Creates request options for agentExtract without sending the request
|
|
102
|
+
*/
|
|
103
|
+
agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts>;
|
|
104
|
+
/**
|
|
105
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
106
|
+
* Agent Extract Handler
|
|
107
|
+
*/
|
|
108
|
+
agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>>;
|
|
109
|
+
/**
|
|
110
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
111
|
+
* Agent Extract Handler
|
|
112
|
+
*/
|
|
113
|
+
agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse>;
|
|
114
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { AskRequestToJSON, AskResponseFromJSON, ExtractRequestToJSON, ExtractResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class AgentApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for agentAsk without sending the request
|
|
31
|
+
*/
|
|
32
|
+
agentAskRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['askRequest'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('askRequest', 'Required parameter "askRequest" was null or undefined when calling agentAsk().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
40
|
+
if (requestParameters['authorization'] != null) {
|
|
41
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
42
|
+
}
|
|
43
|
+
let urlPath = `/v1/agent/ask`;
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
body: AskRequestToJSON(requestParameters['askRequest']),
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
55
|
+
* Agent Ask Handler
|
|
56
|
+
*/
|
|
57
|
+
agentAskRaw(requestParameters, initOverrides) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const requestOptions = yield this.agentAskRequestOpts(requestParameters);
|
|
60
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
61
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AskResponseFromJSON(jsonValue));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
66
|
+
* Agent Ask Handler
|
|
67
|
+
*/
|
|
68
|
+
agentAsk(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield this.agentAskRaw(requestParameters, initOverrides);
|
|
71
|
+
return yield response.value();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Creates request options for agentExtract without sending the request
|
|
76
|
+
*/
|
|
77
|
+
agentExtractRequestOpts(requestParameters) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
if (requestParameters['extractRequest'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('extractRequest', 'Required parameter "extractRequest" was null or undefined when calling agentExtract().');
|
|
81
|
+
}
|
|
82
|
+
const queryParameters = {};
|
|
83
|
+
const headerParameters = {};
|
|
84
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
85
|
+
if (requestParameters['authorization'] != null) {
|
|
86
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
87
|
+
}
|
|
88
|
+
let urlPath = `/v1/agent/extract`;
|
|
89
|
+
return {
|
|
90
|
+
path: urlPath,
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: headerParameters,
|
|
93
|
+
query: queryParameters,
|
|
94
|
+
body: ExtractRequestToJSON(requestParameters['extractRequest']),
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
100
|
+
* Agent Extract Handler
|
|
101
|
+
*/
|
|
102
|
+
agentExtractRaw(requestParameters, initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const requestOptions = yield this.agentExtractRequestOpts(requestParameters);
|
|
105
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ExtractResponseFromJSON(jsonValue));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Run a one-shot structured extraction request and return the payload. Validates the schema input on the route side (DOCUMENT → active version → valid JSON object) BEFORE consuming quota or starting the workflow. Bad schema → 400 with no quota debit. The workflow activity trusts the input and does not re-validate. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning — pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
|
|
111
|
+
* Agent Extract Handler
|
|
112
|
+
*/
|
|
113
|
+
agentExtract(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const response = yield this.agentExtractRaw(requestParameters, initOverrides);
|
|
116
|
+
return yield response.value();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
|
|
13
|
+
import type { ChunkBulkResponse, ChunkNeighborsResponse, ChunkResponse, ChunkSearchRequest, CreateChunkRequest, PartType, ScoredChunkResponse, UpdateChunkContentRequest, UpdateChunkMetadataRequest, VersionChunkIdsResponse } from '../models/index';
|
|
14
14
|
export interface CreateChunkOperationRequest {
|
|
15
15
|
createChunkRequest: CreateChunkRequest;
|
|
16
16
|
authorization?: string | null;
|
|
@@ -31,7 +31,8 @@ export interface GetChunkNeighborsRequest {
|
|
|
31
31
|
chunkId: string;
|
|
32
32
|
prev?: number;
|
|
33
33
|
next?: number;
|
|
34
|
-
|
|
34
|
+
contentType?: PartType;
|
|
35
|
+
withinSection?: boolean;
|
|
35
36
|
authorization?: string | null;
|
|
36
37
|
ksUat?: string | null;
|
|
37
38
|
}
|
|
@@ -149,9 +150,10 @@ export interface ChunksApiInterface {
|
|
|
149
150
|
/**
|
|
150
151
|
* Creates request options for getChunkNeighbors without sending the request
|
|
151
152
|
* @param {string} chunkId
|
|
152
|
-
* @param {number} [prev] Number of preceding
|
|
153
|
-
* @param {number} [next] Number of succeeding
|
|
154
|
-
* @param {
|
|
153
|
+
* @param {number} [prev] Number of preceding items to include (max 50).
|
|
154
|
+
* @param {number} [next] Number of succeeding items to include (max 50).
|
|
155
|
+
* @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
|
|
156
|
+
* @param {boolean} [withinSection] When true (default), traverse only the anchor\'s sibling chain under the same parent. When false, traverse the entire document version in DFS order, crossing section boundaries.
|
|
155
157
|
* @param {string} [authorization]
|
|
156
158
|
* @param {string} [ksUat]
|
|
157
159
|
* @throws {RequiredError}
|
|
@@ -159,12 +161,13 @@ export interface ChunksApiInterface {
|
|
|
159
161
|
*/
|
|
160
162
|
getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
|
|
161
163
|
/**
|
|
162
|
-
*
|
|
164
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
163
165
|
* @summary Get Chunk Neighbors Handler
|
|
164
166
|
* @param {string} chunkId
|
|
165
|
-
* @param {number} [prev] Number of preceding
|
|
166
|
-
* @param {number} [next] Number of succeeding
|
|
167
|
-
* @param {
|
|
167
|
+
* @param {number} [prev] Number of preceding items to include (max 50).
|
|
168
|
+
* @param {number} [next] Number of succeeding items to include (max 50).
|
|
169
|
+
* @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
|
|
170
|
+
* @param {boolean} [withinSection] When true (default), traverse only the anchor\'s sibling chain under the same parent. When false, traverse the entire document version in DFS order, crossing section boundaries.
|
|
168
171
|
* @param {string} [authorization]
|
|
169
172
|
* @param {string} [ksUat]
|
|
170
173
|
* @param {*} [options] Override http request option.
|
|
@@ -173,7 +176,7 @@ export interface ChunksApiInterface {
|
|
|
173
176
|
*/
|
|
174
177
|
getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
|
|
175
178
|
/**
|
|
176
|
-
*
|
|
179
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
177
180
|
* Get Chunk Neighbors Handler
|
|
178
181
|
*/
|
|
179
182
|
getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
|
|
@@ -237,7 +240,7 @@ export interface ChunksApiInterface {
|
|
|
237
240
|
*/
|
|
238
241
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
239
242
|
/**
|
|
240
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
243
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
241
244
|
* @summary Search Chunks Handler
|
|
242
245
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
243
246
|
* @param {string} [authorization]
|
|
@@ -248,7 +251,7 @@ export interface ChunksApiInterface {
|
|
|
248
251
|
*/
|
|
249
252
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
250
253
|
/**
|
|
251
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
254
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
252
255
|
* Search Chunks Handler
|
|
253
256
|
*/
|
|
254
257
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -358,12 +361,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
358
361
|
*/
|
|
359
362
|
getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
|
|
360
363
|
/**
|
|
361
|
-
*
|
|
364
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
362
365
|
* Get Chunk Neighbors Handler
|
|
363
366
|
*/
|
|
364
367
|
getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
|
|
365
368
|
/**
|
|
366
|
-
*
|
|
369
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
367
370
|
* Get Chunk Neighbors Handler
|
|
368
371
|
*/
|
|
369
372
|
getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
|
|
@@ -400,12 +403,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
400
403
|
*/
|
|
401
404
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
402
405
|
/**
|
|
403
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
406
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
404
407
|
* Search Chunks Handler
|
|
405
408
|
*/
|
|
406
409
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
407
410
|
/**
|
|
408
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
411
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
409
412
|
* Search Chunks Handler
|
|
410
413
|
*/
|
|
411
414
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -176,8 +176,11 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
176
176
|
if (requestParameters['next'] != null) {
|
|
177
177
|
queryParameters['next'] = requestParameters['next'];
|
|
178
178
|
}
|
|
179
|
-
if (requestParameters['
|
|
180
|
-
queryParameters['
|
|
179
|
+
if (requestParameters['contentType'] != null) {
|
|
180
|
+
queryParameters['content_type'] = requestParameters['contentType'];
|
|
181
|
+
}
|
|
182
|
+
if (requestParameters['withinSection'] != null) {
|
|
183
|
+
queryParameters['within_section'] = requestParameters['withinSection'];
|
|
181
184
|
}
|
|
182
185
|
const headerParameters = {};
|
|
183
186
|
if (requestParameters['authorization'] != null) {
|
|
@@ -194,7 +197,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
194
197
|
});
|
|
195
198
|
}
|
|
196
199
|
/**
|
|
197
|
-
*
|
|
200
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
198
201
|
* Get Chunk Neighbors Handler
|
|
199
202
|
*/
|
|
200
203
|
getChunkNeighborsRaw(requestParameters, initOverrides) {
|
|
@@ -205,7 +208,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
205
208
|
});
|
|
206
209
|
}
|
|
207
210
|
/**
|
|
208
|
-
*
|
|
211
|
+
* Return a window of items around an anchor chunk. Two traversal modes: - ``within_section=true`` (default): walks the sibling linked-list under the anchor\'s parent. Stops at items outside ``content_type`` when set. Authorized by the anchor\'s path read permission alone. - ``within_section=false``: walks the full document version in depth-first order and slices a window around the anchor. Crosses section boundaries. Additionally requires read permission on the enclosing document version\'s path (matching the ``/v1/document_versions/{id}/contents`` endpoint). USERs whose path permissions are scoped to a sub-section of the version will get ``403`` and should use ``within_section=true``. ``content_type=SECTION`` is rejected with ``400``: the anchor is always a chunk, so a SECTION-only filter would exclude it.
|
|
209
212
|
* Get Chunk Neighbors Handler
|
|
210
213
|
*/
|
|
211
214
|
getChunkNeighbors(requestParameters, initOverrides) {
|
|
@@ -328,7 +331,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
328
331
|
});
|
|
329
332
|
}
|
|
330
333
|
/**
|
|
331
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
334
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
332
335
|
* Search Chunks Handler
|
|
333
336
|
*/
|
|
334
337
|
searchChunksRaw(requestParameters, initOverrides) {
|
|
@@ -339,7 +342,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
339
342
|
});
|
|
340
343
|
}
|
|
341
344
|
/**
|
|
342
|
-
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
345
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres. **Billing note.** SEARCH consume runs *before* path-permission resolution. A request that resolves to an empty permission set (caller has read access to nothing in the requested scope) returns ``[]`` cleanly — without raising — so it is **not** refunded. This is intentional: differential billing for a no-results case would leak access shape to the caller. Callers concerned about charged no-op searches should validate path access client-side first.
|
|
343
346
|
* Search Chunks Handler
|
|
344
347
|
*/
|
|
345
348
|
searchChunks(requestParameters, initOverrides) {
|
|
@@ -263,7 +263,7 @@ export interface DocumentsApiInterface {
|
|
|
263
263
|
*/
|
|
264
264
|
updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
265
265
|
/**
|
|
266
|
-
* Update a document (rename, move,
|
|
266
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
267
267
|
* @summary Update Document Handler
|
|
268
268
|
* @param {string} documentId
|
|
269
269
|
* @param {UpdateDocumentRequest} updateDocumentRequest
|
|
@@ -275,7 +275,7 @@ export interface DocumentsApiInterface {
|
|
|
275
275
|
*/
|
|
276
276
|
updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>>;
|
|
277
277
|
/**
|
|
278
|
-
* Update a document (rename, move,
|
|
278
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
279
279
|
* Update Document Handler
|
|
280
280
|
*/
|
|
281
281
|
updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
@@ -373,12 +373,12 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
373
373
|
*/
|
|
374
374
|
updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
375
375
|
/**
|
|
376
|
-
* Update a document (rename, move,
|
|
376
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
377
377
|
* Update Document Handler
|
|
378
378
|
*/
|
|
379
379
|
updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>>;
|
|
380
380
|
/**
|
|
381
|
-
* Update a document (rename, move,
|
|
381
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
382
382
|
* Update Document Handler
|
|
383
383
|
*/
|
|
384
384
|
updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
@@ -406,7 +406,7 @@ export class DocumentsApi extends runtime.BaseAPI {
|
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
/**
|
|
409
|
-
* Update a document (rename, move,
|
|
409
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
410
410
|
* Update Document Handler
|
|
411
411
|
*/
|
|
412
412
|
updateDocumentRaw(requestParameters, initOverrides) {
|
|
@@ -417,7 +417,7 @@ export class DocumentsApi extends runtime.BaseAPI {
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
/**
|
|
420
|
-
* Update a document (rename, move,
|
|
420
|
+
* Update a document (rename, move, change active version, Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. To toggle Qdrant exclusion: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
421
421
|
* Update Document Handler
|
|
422
422
|
*/
|
|
423
423
|
updateDocument(requestParameters, initOverrides) {
|
|
@@ -296,7 +296,7 @@ export interface FoldersApiInterface {
|
|
|
296
296
|
*/
|
|
297
297
|
updateFolderRequestOpts(requestParameters: UpdateFolderOperationRequest): Promise<runtime.RequestOpts>;
|
|
298
298
|
/**
|
|
299
|
-
* Update a folder (rename and/or
|
|
299
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
300
300
|
* @summary Update Folder Handler
|
|
301
301
|
* @param {string} folderId
|
|
302
302
|
* @param {UpdateFolderRequest} updateFolderRequest
|
|
@@ -308,7 +308,7 @@ export interface FoldersApiInterface {
|
|
|
308
308
|
*/
|
|
309
309
|
updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>>;
|
|
310
310
|
/**
|
|
311
|
-
* Update a folder (rename and/or
|
|
311
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
312
312
|
* Update Folder Handler
|
|
313
313
|
*/
|
|
314
314
|
updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
|
|
@@ -420,12 +420,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
420
420
|
*/
|
|
421
421
|
updateFolderRequestOpts(requestParameters: UpdateFolderOperationRequest): Promise<runtime.RequestOpts>;
|
|
422
422
|
/**
|
|
423
|
-
* Update a folder (rename and/or
|
|
423
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
424
424
|
* Update Folder Handler
|
|
425
425
|
*/
|
|
426
426
|
updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>>;
|
|
427
427
|
/**
|
|
428
|
-
* Update a folder (rename and/or
|
|
428
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
429
429
|
* Update Folder Handler
|
|
430
430
|
*/
|
|
431
431
|
updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
|
|
@@ -418,7 +418,7 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
/**
|
|
421
|
-
* Update a folder (rename and/or
|
|
421
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
422
422
|
* Update Folder Handler
|
|
423
423
|
*/
|
|
424
424
|
updateFolderRaw(requestParameters, initOverrides) {
|
|
@@ -429,7 +429,7 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
/**
|
|
432
|
-
* Update a folder (rename and/or
|
|
432
|
+
* Update a folder (rename, move, and/or toggle Qdrant exclusion). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To toggle Qdrant exclusion for this folder and its descendants: provide `exclude_from_qdrant` field. Any combination can be sent in a single request.
|
|
433
433
|
* Update Folder Handler
|
|
434
434
|
*/
|
|
435
435
|
updateFolder(requestParameters, initOverrides) {
|