@knowledge-stack/ksapi 1.72.4 → 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,225 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AskRequest,
|
|
19
|
+
AskResponse,
|
|
20
|
+
ExtractRequest,
|
|
21
|
+
ExtractResponse,
|
|
22
|
+
HTTPValidationError,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
AskRequestFromJSON,
|
|
26
|
+
AskRequestToJSON,
|
|
27
|
+
AskResponseFromJSON,
|
|
28
|
+
AskResponseToJSON,
|
|
29
|
+
ExtractRequestFromJSON,
|
|
30
|
+
ExtractRequestToJSON,
|
|
31
|
+
ExtractResponseFromJSON,
|
|
32
|
+
ExtractResponseToJSON,
|
|
33
|
+
HTTPValidationErrorFromJSON,
|
|
34
|
+
HTTPValidationErrorToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface AgentAskRequest {
|
|
38
|
+
askRequest: AskRequest;
|
|
39
|
+
authorization?: string | null;
|
|
40
|
+
ksUat?: string | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface AgentExtractRequest {
|
|
44
|
+
extractRequest: ExtractRequest;
|
|
45
|
+
authorization?: string | null;
|
|
46
|
+
ksUat?: string | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* AgentApi - interface
|
|
51
|
+
*
|
|
52
|
+
* @export
|
|
53
|
+
* @interface AgentApiInterface
|
|
54
|
+
*/
|
|
55
|
+
export interface AgentApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for agentAsk without sending the request
|
|
58
|
+
* @param {AskRequest} askRequest
|
|
59
|
+
* @param {string} [authorization]
|
|
60
|
+
* @param {string} [ksUat]
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof AgentApiInterface
|
|
63
|
+
*/
|
|
64
|
+
agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 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.
|
|
68
|
+
* @summary Agent Ask Handler
|
|
69
|
+
* @param {AskRequest} askRequest
|
|
70
|
+
* @param {string} [authorization]
|
|
71
|
+
* @param {string} [ksUat]
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
* @memberof AgentApiInterface
|
|
75
|
+
*/
|
|
76
|
+
agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 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.
|
|
80
|
+
* Agent Ask Handler
|
|
81
|
+
*/
|
|
82
|
+
agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Creates request options for agentExtract without sending the request
|
|
86
|
+
* @param {ExtractRequest} extractRequest
|
|
87
|
+
* @param {string} [authorization]
|
|
88
|
+
* @param {string} [ksUat]
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
* @memberof AgentApiInterface
|
|
91
|
+
*/
|
|
92
|
+
agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 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.
|
|
96
|
+
* @summary Agent Extract Handler
|
|
97
|
+
* @param {ExtractRequest} extractRequest
|
|
98
|
+
* @param {string} [authorization]
|
|
99
|
+
* @param {string} [ksUat]
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
* @memberof AgentApiInterface
|
|
103
|
+
*/
|
|
104
|
+
agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 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.
|
|
108
|
+
* Agent Extract Handler
|
|
109
|
+
*/
|
|
110
|
+
agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse>;
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
export class AgentApi extends runtime.BaseAPI implements AgentApiInterface {
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for agentAsk without sending the request
|
|
121
|
+
*/
|
|
122
|
+
async agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts> {
|
|
123
|
+
if (requestParameters['askRequest'] == null) {
|
|
124
|
+
throw new runtime.RequiredError(
|
|
125
|
+
'askRequest',
|
|
126
|
+
'Required parameter "askRequest" was null or undefined when calling agentAsk().'
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const queryParameters: any = {};
|
|
131
|
+
|
|
132
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
133
|
+
|
|
134
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
135
|
+
|
|
136
|
+
if (requestParameters['authorization'] != null) {
|
|
137
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
let urlPath = `/v1/agent/ask`;
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
path: urlPath,
|
|
145
|
+
method: 'POST',
|
|
146
|
+
headers: headerParameters,
|
|
147
|
+
query: queryParameters,
|
|
148
|
+
body: AskRequestToJSON(requestParameters['askRequest']),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 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.
|
|
154
|
+
* Agent Ask Handler
|
|
155
|
+
*/
|
|
156
|
+
async agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>> {
|
|
157
|
+
const requestOptions = await this.agentAskRequestOpts(requestParameters);
|
|
158
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
159
|
+
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AskResponseFromJSON(jsonValue));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* 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.
|
|
165
|
+
* Agent Ask Handler
|
|
166
|
+
*/
|
|
167
|
+
async agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse> {
|
|
168
|
+
const response = await this.agentAskRaw(requestParameters, initOverrides);
|
|
169
|
+
return await response.value();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Creates request options for agentExtract without sending the request
|
|
174
|
+
*/
|
|
175
|
+
async agentExtractRequestOpts(requestParameters: AgentExtractRequest): Promise<runtime.RequestOpts> {
|
|
176
|
+
if (requestParameters['extractRequest'] == null) {
|
|
177
|
+
throw new runtime.RequiredError(
|
|
178
|
+
'extractRequest',
|
|
179
|
+
'Required parameter "extractRequest" was null or undefined when calling agentExtract().'
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const queryParameters: any = {};
|
|
184
|
+
|
|
185
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
186
|
+
|
|
187
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
188
|
+
|
|
189
|
+
if (requestParameters['authorization'] != null) {
|
|
190
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
let urlPath = `/v1/agent/extract`;
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
path: urlPath,
|
|
198
|
+
method: 'POST',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters,
|
|
201
|
+
body: ExtractRequestToJSON(requestParameters['extractRequest']),
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 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.
|
|
207
|
+
* Agent Extract Handler
|
|
208
|
+
*/
|
|
209
|
+
async agentExtractRaw(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExtractResponse>> {
|
|
210
|
+
const requestOptions = await this.agentExtractRequestOpts(requestParameters);
|
|
211
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
212
|
+
|
|
213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ExtractResponseFromJSON(jsonValue));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* 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.
|
|
218
|
+
* Agent Extract Handler
|
|
219
|
+
*/
|
|
220
|
+
async agentExtract(requestParameters: AgentExtractRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExtractResponse> {
|
|
221
|
+
const response = await this.agentExtractRaw(requestParameters, initOverrides);
|
|
222
|
+
return await response.value();
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
}
|
package/src/apis/ChunksApi.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
ChunkSearchRequest,
|
|
22
22
|
CreateChunkRequest,
|
|
23
23
|
HTTPValidationError,
|
|
24
|
+
PartType,
|
|
24
25
|
ScoredChunkResponse,
|
|
25
26
|
UpdateChunkContentRequest,
|
|
26
27
|
UpdateChunkMetadataRequest,
|
|
@@ -39,6 +40,8 @@ import {
|
|
|
39
40
|
CreateChunkRequestToJSON,
|
|
40
41
|
HTTPValidationErrorFromJSON,
|
|
41
42
|
HTTPValidationErrorToJSON,
|
|
43
|
+
PartTypeFromJSON,
|
|
44
|
+
PartTypeToJSON,
|
|
42
45
|
ScoredChunkResponseFromJSON,
|
|
43
46
|
ScoredChunkResponseToJSON,
|
|
44
47
|
UpdateChunkContentRequestFromJSON,
|
|
@@ -72,7 +75,8 @@ export interface GetChunkNeighborsRequest {
|
|
|
72
75
|
chunkId: string;
|
|
73
76
|
prev?: number;
|
|
74
77
|
next?: number;
|
|
75
|
-
|
|
78
|
+
contentType?: PartType;
|
|
79
|
+
withinSection?: boolean;
|
|
76
80
|
authorization?: string | null;
|
|
77
81
|
ksUat?: string | null;
|
|
78
82
|
}
|
|
@@ -205,9 +209,10 @@ export interface ChunksApiInterface {
|
|
|
205
209
|
/**
|
|
206
210
|
* Creates request options for getChunkNeighbors without sending the request
|
|
207
211
|
* @param {string} chunkId
|
|
208
|
-
* @param {number} [prev] Number of preceding
|
|
209
|
-
* @param {number} [next] Number of succeeding
|
|
210
|
-
* @param {
|
|
212
|
+
* @param {number} [prev] Number of preceding items to include (max 50).
|
|
213
|
+
* @param {number} [next] Number of succeeding items to include (max 50).
|
|
214
|
+
* @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
|
|
215
|
+
* @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.
|
|
211
216
|
* @param {string} [authorization]
|
|
212
217
|
* @param {string} [ksUat]
|
|
213
218
|
* @throws {RequiredError}
|
|
@@ -216,12 +221,13 @@ export interface ChunksApiInterface {
|
|
|
216
221
|
getChunkNeighborsRequestOpts(requestParameters: GetChunkNeighborsRequest): Promise<runtime.RequestOpts>;
|
|
217
222
|
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* 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.
|
|
220
225
|
* @summary Get Chunk Neighbors Handler
|
|
221
226
|
* @param {string} chunkId
|
|
222
|
-
* @param {number} [prev] Number of preceding
|
|
223
|
-
* @param {number} [next] Number of succeeding
|
|
224
|
-
* @param {
|
|
227
|
+
* @param {number} [prev] Number of preceding items to include (max 50).
|
|
228
|
+
* @param {number} [next] Number of succeeding items to include (max 50).
|
|
229
|
+
* @param {PartType} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both. SECTION is rejected when the anchor is a chunk (always).
|
|
230
|
+
* @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.
|
|
225
231
|
* @param {string} [authorization]
|
|
226
232
|
* @param {string} [ksUat]
|
|
227
233
|
* @param {*} [options] Override http request option.
|
|
@@ -231,7 +237,7 @@ export interface ChunksApiInterface {
|
|
|
231
237
|
getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>>;
|
|
232
238
|
|
|
233
239
|
/**
|
|
234
|
-
*
|
|
240
|
+
* 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.
|
|
235
241
|
* Get Chunk Neighbors Handler
|
|
236
242
|
*/
|
|
237
243
|
getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse>;
|
|
@@ -303,7 +309,7 @@ export interface ChunksApiInterface {
|
|
|
303
309
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
304
310
|
|
|
305
311
|
/**
|
|
306
|
-
* 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.
|
|
312
|
+
* 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.
|
|
307
313
|
* @summary Search Chunks Handler
|
|
308
314
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
309
315
|
* @param {string} [authorization]
|
|
@@ -315,7 +321,7 @@ export interface ChunksApiInterface {
|
|
|
315
321
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
316
322
|
|
|
317
323
|
/**
|
|
318
|
-
* 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.
|
|
324
|
+
* 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.
|
|
319
325
|
* Search Chunks Handler
|
|
320
326
|
*/
|
|
321
327
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -566,8 +572,12 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
566
572
|
queryParameters['next'] = requestParameters['next'];
|
|
567
573
|
}
|
|
568
574
|
|
|
569
|
-
if (requestParameters['
|
|
570
|
-
queryParameters['
|
|
575
|
+
if (requestParameters['contentType'] != null) {
|
|
576
|
+
queryParameters['content_type'] = requestParameters['contentType'];
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
if (requestParameters['withinSection'] != null) {
|
|
580
|
+
queryParameters['within_section'] = requestParameters['withinSection'];
|
|
571
581
|
}
|
|
572
582
|
|
|
573
583
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -589,7 +599,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
589
599
|
}
|
|
590
600
|
|
|
591
601
|
/**
|
|
592
|
-
*
|
|
602
|
+
* 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.
|
|
593
603
|
* Get Chunk Neighbors Handler
|
|
594
604
|
*/
|
|
595
605
|
async getChunkNeighborsRaw(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkNeighborsResponse>> {
|
|
@@ -600,7 +610,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
600
610
|
}
|
|
601
611
|
|
|
602
612
|
/**
|
|
603
|
-
*
|
|
613
|
+
* 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.
|
|
604
614
|
* Get Chunk Neighbors Handler
|
|
605
615
|
*/
|
|
606
616
|
async getChunkNeighbors(requestParameters: GetChunkNeighborsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkNeighborsResponse> {
|
|
@@ -743,7 +753,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
743
753
|
}
|
|
744
754
|
|
|
745
755
|
/**
|
|
746
|
-
* 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.
|
|
756
|
+
* 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.
|
|
747
757
|
* Search Chunks Handler
|
|
748
758
|
*/
|
|
749
759
|
async searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>> {
|
|
@@ -754,7 +764,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
754
764
|
}
|
|
755
765
|
|
|
756
766
|
/**
|
|
757
|
-
* 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.
|
|
767
|
+
* 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.
|
|
758
768
|
* Search Chunks Handler
|
|
759
769
|
*/
|
|
760
770
|
async searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>> {
|
package/src/apis/DocumentsApi.ts
CHANGED
|
@@ -327,7 +327,7 @@ export interface DocumentsApiInterface {
|
|
|
327
327
|
updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* Update a document (rename, move,
|
|
330
|
+
* 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.
|
|
331
331
|
* @summary Update Document Handler
|
|
332
332
|
* @param {string} documentId
|
|
333
333
|
* @param {UpdateDocumentRequest} updateDocumentRequest
|
|
@@ -340,7 +340,7 @@ export interface DocumentsApiInterface {
|
|
|
340
340
|
updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>>;
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
|
-
* Update a document (rename, move,
|
|
343
|
+
* 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.
|
|
344
344
|
* Update Document Handler
|
|
345
345
|
*/
|
|
346
346
|
updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
@@ -812,7 +812,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
|
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
/**
|
|
815
|
-
* Update a document (rename, move,
|
|
815
|
+
* 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.
|
|
816
816
|
* Update Document Handler
|
|
817
817
|
*/
|
|
818
818
|
async updateDocumentRaw(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentResponse>> {
|
|
@@ -823,7 +823,7 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
|
|
|
823
823
|
}
|
|
824
824
|
|
|
825
825
|
/**
|
|
826
|
-
* Update a document (rename, move,
|
|
826
|
+
* 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.
|
|
827
827
|
* Update Document Handler
|
|
828
828
|
*/
|
|
829
829
|
async updateDocument(requestParameters: UpdateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse> {
|
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -367,7 +367,7 @@ export interface FoldersApiInterface {
|
|
|
367
367
|
updateFolderRequestOpts(requestParameters: UpdateFolderOperationRequest): Promise<runtime.RequestOpts>;
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
|
-
* Update a folder (rename and/or
|
|
370
|
+
* 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.
|
|
371
371
|
* @summary Update Folder Handler
|
|
372
372
|
* @param {string} folderId
|
|
373
373
|
* @param {UpdateFolderRequest} updateFolderRequest
|
|
@@ -380,7 +380,7 @@ export interface FoldersApiInterface {
|
|
|
380
380
|
updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>>;
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
|
-
* Update a folder (rename and/or
|
|
383
|
+
* 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.
|
|
384
384
|
* Update Folder Handler
|
|
385
385
|
*/
|
|
386
386
|
updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse>;
|
|
@@ -866,7 +866,7 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
/**
|
|
869
|
-
* Update a folder (rename and/or
|
|
869
|
+
* 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.
|
|
870
870
|
* Update Folder Handler
|
|
871
871
|
*/
|
|
872
872
|
async updateFolderRaw(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FolderResponse>> {
|
|
@@ -877,7 +877,7 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
/**
|
|
880
|
-
* Update a folder (rename and/or
|
|
880
|
+
* 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.
|
|
881
881
|
* Update Folder Handler
|
|
882
882
|
*/
|
|
883
883
|
async updateFolder(requestParameters: UpdateFolderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FolderResponse> {
|
package/src/apis/InvitesApi.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
InviteStatus,
|
|
22
22
|
InviteUserRequest,
|
|
23
23
|
PaginatedResponseInviteResponse,
|
|
24
|
+
UpdateInviteRequest,
|
|
24
25
|
} from '../models/index';
|
|
25
26
|
import {
|
|
26
27
|
AcceptInviteResponseFromJSON,
|
|
@@ -35,6 +36,8 @@ import {
|
|
|
35
36
|
InviteUserRequestToJSON,
|
|
36
37
|
PaginatedResponseInviteResponseFromJSON,
|
|
37
38
|
PaginatedResponseInviteResponseToJSON,
|
|
39
|
+
UpdateInviteRequestFromJSON,
|
|
40
|
+
UpdateInviteRequestToJSON,
|
|
38
41
|
} from '../models/index';
|
|
39
42
|
|
|
40
43
|
export interface AcceptInviteRequest {
|
|
@@ -64,6 +67,13 @@ export interface ListInvitesRequest {
|
|
|
64
67
|
ksUat?: string | null;
|
|
65
68
|
}
|
|
66
69
|
|
|
70
|
+
export interface UpdateInviteOperationRequest {
|
|
71
|
+
inviteId: string;
|
|
72
|
+
updateInviteRequest: UpdateInviteRequest;
|
|
73
|
+
authorization?: string | null;
|
|
74
|
+
ksUat?: string | null;
|
|
75
|
+
}
|
|
76
|
+
|
|
67
77
|
/**
|
|
68
78
|
* InvitesApi - interface
|
|
69
79
|
*
|
|
@@ -73,7 +83,7 @@ export interface ListInvitesRequest {
|
|
|
73
83
|
export interface InvitesApiInterface {
|
|
74
84
|
/**
|
|
75
85
|
* Creates request options for acceptInvite without sending the request
|
|
76
|
-
* @param {string} inviteId
|
|
86
|
+
* @param {string} inviteId Either an Invite ID (traditional per-email invite) OR a Tenant ID (when the tenant has ``invite_link.enabled``). Tenant lookup is tried first.
|
|
77
87
|
* @param {string} [authorization]
|
|
78
88
|
* @param {string} [ksUat]
|
|
79
89
|
* @throws {RequiredError}
|
|
@@ -82,9 +92,9 @@ export interface InvitesApiInterface {
|
|
|
82
92
|
acceptInviteRequestOpts(requestParameters: AcceptInviteRequest): Promise<runtime.RequestOpts>;
|
|
83
93
|
|
|
84
94
|
/**
|
|
85
|
-
*
|
|
95
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
86
96
|
* @summary Accept Invite
|
|
87
|
-
* @param {string} inviteId
|
|
97
|
+
* @param {string} inviteId Either an Invite ID (traditional per-email invite) OR a Tenant ID (when the tenant has ``invite_link.enabled``). Tenant lookup is tried first.
|
|
88
98
|
* @param {string} [authorization]
|
|
89
99
|
* @param {string} [ksUat]
|
|
90
100
|
* @param {*} [options] Override http request option.
|
|
@@ -94,7 +104,7 @@ export interface InvitesApiInterface {
|
|
|
94
104
|
acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>>;
|
|
95
105
|
|
|
96
106
|
/**
|
|
97
|
-
*
|
|
107
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
98
108
|
* Accept Invite
|
|
99
109
|
*/
|
|
100
110
|
acceptInvite(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse>;
|
|
@@ -189,6 +199,36 @@ export interface InvitesApiInterface {
|
|
|
189
199
|
*/
|
|
190
200
|
listInvites(requestParameters: ListInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseInviteResponse>;
|
|
191
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Creates request options for updateInvite without sending the request
|
|
204
|
+
* @param {string} inviteId
|
|
205
|
+
* @param {UpdateInviteRequest} updateInviteRequest
|
|
206
|
+
* @param {string} [authorization]
|
|
207
|
+
* @param {string} [ksUat]
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
* @memberof InvitesApiInterface
|
|
210
|
+
*/
|
|
211
|
+
updateInviteRequestOpts(requestParameters: UpdateInviteOperationRequest): Promise<runtime.RequestOpts>;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
215
|
+
* @summary Update Invite Handler
|
|
216
|
+
* @param {string} inviteId
|
|
217
|
+
* @param {UpdateInviteRequest} updateInviteRequest
|
|
218
|
+
* @param {string} [authorization]
|
|
219
|
+
* @param {string} [ksUat]
|
|
220
|
+
* @param {*} [options] Override http request option.
|
|
221
|
+
* @throws {RequiredError}
|
|
222
|
+
* @memberof InvitesApiInterface
|
|
223
|
+
*/
|
|
224
|
+
updateInviteRaw(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteResponse>>;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
228
|
+
* Update Invite Handler
|
|
229
|
+
*/
|
|
230
|
+
updateInvite(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
231
|
+
|
|
192
232
|
}
|
|
193
233
|
|
|
194
234
|
/**
|
|
@@ -228,7 +268,7 @@ export class InvitesApi extends runtime.BaseAPI implements InvitesApiInterface {
|
|
|
228
268
|
}
|
|
229
269
|
|
|
230
270
|
/**
|
|
231
|
-
*
|
|
271
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
232
272
|
* Accept Invite
|
|
233
273
|
*/
|
|
234
274
|
async acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>> {
|
|
@@ -239,7 +279,7 @@ export class InvitesApi extends runtime.BaseAPI implements InvitesApiInterface {
|
|
|
239
279
|
}
|
|
240
280
|
|
|
241
281
|
/**
|
|
242
|
-
*
|
|
282
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
243
283
|
* Accept Invite
|
|
244
284
|
*/
|
|
245
285
|
async acceptInvite(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse> {
|
|
@@ -409,4 +449,65 @@ export class InvitesApi extends runtime.BaseAPI implements InvitesApiInterface {
|
|
|
409
449
|
return await response.value();
|
|
410
450
|
}
|
|
411
451
|
|
|
452
|
+
/**
|
|
453
|
+
* Creates request options for updateInvite without sending the request
|
|
454
|
+
*/
|
|
455
|
+
async updateInviteRequestOpts(requestParameters: UpdateInviteOperationRequest): Promise<runtime.RequestOpts> {
|
|
456
|
+
if (requestParameters['inviteId'] == null) {
|
|
457
|
+
throw new runtime.RequiredError(
|
|
458
|
+
'inviteId',
|
|
459
|
+
'Required parameter "inviteId" was null or undefined when calling updateInvite().'
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
if (requestParameters['updateInviteRequest'] == null) {
|
|
464
|
+
throw new runtime.RequiredError(
|
|
465
|
+
'updateInviteRequest',
|
|
466
|
+
'Required parameter "updateInviteRequest" was null or undefined when calling updateInvite().'
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
const queryParameters: any = {};
|
|
471
|
+
|
|
472
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
473
|
+
|
|
474
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
475
|
+
|
|
476
|
+
if (requestParameters['authorization'] != null) {
|
|
477
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
let urlPath = `/v1/invites/{invite_id}`;
|
|
482
|
+
urlPath = urlPath.replace(`{${"invite_id"}}`, encodeURIComponent(String(requestParameters['inviteId'])));
|
|
483
|
+
|
|
484
|
+
return {
|
|
485
|
+
path: urlPath,
|
|
486
|
+
method: 'PATCH',
|
|
487
|
+
headers: headerParameters,
|
|
488
|
+
query: queryParameters,
|
|
489
|
+
body: UpdateInviteRequestToJSON(requestParameters['updateInviteRequest']),
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
495
|
+
* Update Invite Handler
|
|
496
|
+
*/
|
|
497
|
+
async updateInviteRaw(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteResponse>> {
|
|
498
|
+
const requestOptions = await this.updateInviteRequestOpts(requestParameters);
|
|
499
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
500
|
+
|
|
501
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InviteResponseFromJSON(jsonValue));
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
506
|
+
* Update Invite Handler
|
|
507
|
+
*/
|
|
508
|
+
async updateInvite(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse> {
|
|
509
|
+
const response = await this.updateInviteRaw(requestParameters, initOverrides);
|
|
510
|
+
return await response.value();
|
|
511
|
+
}
|
|
512
|
+
|
|
412
513
|
}
|