@knowledge-stack/ksapi 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +9 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +30 -1
- package/dist/apis/ChunksApi.js +34 -1
- package/dist/apis/TagsApi.d.ts +20 -20
- package/dist/apis/TagsApi.js +10 -10
- package/dist/apis/ThreadsApi.d.ts +4 -4
- package/dist/apis/ThreadsApi.js +2 -2
- package/dist/apis/UserPermissionsApi.d.ts +154 -0
- package/dist/apis/UserPermissionsApi.js +192 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChunksApi.d.ts +30 -1
- package/dist/esm/apis/ChunksApi.js +35 -2
- package/dist/esm/apis/TagsApi.d.ts +20 -20
- package/dist/esm/apis/TagsApi.js +10 -10
- package/dist/esm/apis/ThreadsApi.d.ts +4 -4
- package/dist/esm/apis/ThreadsApi.js +2 -2
- package/dist/esm/apis/UserPermissionsApi.d.ts +154 -0
- package/dist/esm/apis/UserPermissionsApi.js +188 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ChunkResponse.d.ts +6 -0
- package/dist/esm/models/ChunkResponse.js +4 -0
- package/dist/esm/models/ChunkSearchRequest.d.ts +89 -0
- package/dist/esm/models/ChunkSearchRequest.js +69 -0
- package/dist/esm/models/CreatePermissionRequest.d.ts +66 -0
- package/dist/esm/models/CreatePermissionRequest.js +57 -0
- package/dist/esm/models/DocumentContentPathPart.d.ts +6 -0
- package/dist/esm/models/DocumentContentPathPart.js +4 -0
- package/dist/esm/models/DocumentResponse.d.ts +6 -0
- package/dist/esm/models/DocumentResponse.js +4 -0
- package/dist/esm/models/DocumentVersionResponse.d.ts +6 -0
- package/dist/esm/models/DocumentVersionResponse.js +4 -0
- package/dist/esm/models/EmbeddingModel.d.ts +24 -0
- package/dist/esm/models/EmbeddingModel.js +42 -0
- package/dist/esm/models/FolderDocumentResponse.d.ts +6 -0
- package/dist/esm/models/FolderDocumentResponse.js +4 -0
- package/dist/esm/models/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +4 -0
- package/dist/esm/models/PaginatedResponsePermissionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponsePermissionResponse.js +70 -0
- package/dist/esm/models/PathPartResponse.d.ts +6 -0
- package/dist/esm/models/PathPartResponse.js +4 -0
- package/dist/esm/models/PermissionCapability.d.ts +25 -0
- package/dist/esm/models/PermissionCapability.js +43 -0
- package/dist/esm/models/PermissionResponse.d.ts +84 -0
- package/dist/esm/models/PermissionResponse.js +69 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +127 -0
- package/dist/esm/models/ScoredChunkResponse.js +94 -0
- package/dist/esm/models/SectionResponse.d.ts +6 -0
- package/dist/esm/models/SectionResponse.js +4 -0
- package/dist/esm/models/ThreadMessageResponse.d.ts +6 -0
- package/dist/esm/models/ThreadMessageResponse.js +4 -0
- package/dist/esm/models/ThreadResponse.d.ts +6 -0
- package/dist/esm/models/ThreadResponse.js +4 -0
- package/dist/esm/models/UpdatePermissionRequest.d.ts +54 -0
- package/dist/esm/models/UpdatePermissionRequest.js +45 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/ChunkResponse.d.ts +6 -0
- package/dist/models/ChunkResponse.js +4 -0
- package/dist/models/ChunkSearchRequest.d.ts +89 -0
- package/dist/models/ChunkSearchRequest.js +77 -0
- package/dist/models/CreatePermissionRequest.d.ts +66 -0
- package/dist/models/CreatePermissionRequest.js +65 -0
- package/dist/models/DocumentContentPathPart.d.ts +6 -0
- package/dist/models/DocumentContentPathPart.js +4 -0
- package/dist/models/DocumentResponse.d.ts +6 -0
- package/dist/models/DocumentResponse.js +4 -0
- package/dist/models/DocumentVersionResponse.d.ts +6 -0
- package/dist/models/DocumentVersionResponse.js +4 -0
- package/dist/models/EmbeddingModel.d.ts +24 -0
- package/dist/models/EmbeddingModel.js +50 -0
- package/dist/models/FolderDocumentResponse.d.ts +6 -0
- package/dist/models/FolderDocumentResponse.js +4 -0
- package/dist/models/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +4 -0
- package/dist/models/PaginatedResponsePermissionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponsePermissionResponse.js +78 -0
- package/dist/models/PathPartResponse.d.ts +6 -0
- package/dist/models/PathPartResponse.js +4 -0
- package/dist/models/PermissionCapability.d.ts +25 -0
- package/dist/models/PermissionCapability.js +51 -0
- package/dist/models/PermissionResponse.d.ts +84 -0
- package/dist/models/PermissionResponse.js +77 -0
- package/dist/models/ScoredChunkResponse.d.ts +127 -0
- package/dist/models/ScoredChunkResponse.js +102 -0
- package/dist/models/SectionResponse.d.ts +6 -0
- package/dist/models/SectionResponse.js +4 -0
- package/dist/models/ThreadMessageResponse.d.ts +6 -0
- package/dist/models/ThreadMessageResponse.js +4 -0
- package/dist/models/ThreadResponse.d.ts +6 -0
- package/dist/models/ThreadResponse.js +4 -0
- package/dist/models/UpdatePermissionRequest.d.ts +54 -0
- package/dist/models/UpdatePermissionRequest.js +53 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +70 -1
- package/src/apis/TagsApi.ts +20 -20
- package/src/apis/ThreadsApi.ts +4 -4
- package/src/apis/UserPermissionsApi.ts +362 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ChunkResponse.ts +9 -0
- package/src/models/ChunkSearchRequest.ts +160 -0
- package/src/models/CreatePermissionRequest.ts +120 -0
- package/src/models/DocumentContentPathPart.ts +9 -0
- package/src/models/DocumentResponse.ts +9 -0
- package/src/models/DocumentVersionResponse.ts +9 -0
- package/src/models/EmbeddingModel.ts +52 -0
- package/src/models/FolderDocumentResponse.ts +9 -0
- package/src/models/FolderResponse.ts +9 -0
- package/src/models/PaginatedResponsePermissionResponse.ts +130 -0
- package/src/models/PathPartResponse.ts +9 -0
- package/src/models/PermissionCapability.ts +53 -0
- package/src/models/PermissionResponse.ts +147 -0
- package/src/models/ScoredChunkResponse.ts +215 -0
- package/src/models/SectionResponse.ts +9 -0
- package/src/models/ThreadMessageResponse.ts +9 -0
- package/src/models/ThreadResponse.ts +9 -0
- package/src/models/UpdatePermissionRequest.ts +100 -0
- package/src/models/index.ts +8 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdatePermissionRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUpdatePermissionRequest = instanceOfUpdatePermissionRequest;
|
|
18
|
+
exports.UpdatePermissionRequestFromJSON = UpdatePermissionRequestFromJSON;
|
|
19
|
+
exports.UpdatePermissionRequestFromJSONTyped = UpdatePermissionRequestFromJSONTyped;
|
|
20
|
+
exports.UpdatePermissionRequestToJSON = UpdatePermissionRequestToJSON;
|
|
21
|
+
exports.UpdatePermissionRequestToJSONTyped = UpdatePermissionRequestToJSONTyped;
|
|
22
|
+
const PermissionCapability_1 = require("./PermissionCapability");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the UpdatePermissionRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfUpdatePermissionRequest(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function UpdatePermissionRequestFromJSON(json) {
|
|
30
|
+
return UpdatePermissionRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function UpdatePermissionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'path': json['path'] == null ? undefined : json['path'],
|
|
38
|
+
'capability': json['capability'] == null ? undefined : (0, PermissionCapability_1.PermissionCapabilityFromJSON)(json['capability']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function UpdatePermissionRequestToJSON(json) {
|
|
42
|
+
return UpdatePermissionRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function UpdatePermissionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'path': value['path'],
|
|
50
|
+
'capability': (0, PermissionCapability_1.PermissionCapabilityToJSON)(value['capability']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.UpdatePermissionRequestPropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ export * from './ChunkLineageResponse';
|
|
|
2
2
|
export * from './ChunkMetadataInput';
|
|
3
3
|
export * from './ChunkMetadataOutput';
|
|
4
4
|
export * from './ChunkResponse';
|
|
5
|
+
export * from './ChunkSearchRequest';
|
|
5
6
|
export * from './ChunkType';
|
|
6
7
|
export * from './CreateChunkLineageRequest';
|
|
7
8
|
export * from './CreateChunkRequest';
|
|
8
9
|
export * from './CreateDocumentRequest';
|
|
9
10
|
export * from './CreateFolderRequest';
|
|
10
11
|
export * from './CreatePasswordUserRequest';
|
|
12
|
+
export * from './CreatePermissionRequest';
|
|
11
13
|
export * from './CreateSectionRequest';
|
|
12
14
|
export * from './CreateTagRequest';
|
|
13
15
|
export * from './CreateTenantRequest';
|
|
@@ -20,6 +22,7 @@ export * from './DocumentType';
|
|
|
20
22
|
export * from './DocumentVersionResponse';
|
|
21
23
|
export * from './EmailSentResponse';
|
|
22
24
|
export * from './EmailVerificationRequest';
|
|
25
|
+
export * from './EmbeddingModel';
|
|
23
26
|
export * from './FolderDocumentResponse';
|
|
24
27
|
export * from './FolderResponse';
|
|
25
28
|
export * from './HTTPValidationError';
|
|
@@ -40,6 +43,7 @@ export * from './PaginatedResponseFolderDocumentResponse';
|
|
|
40
43
|
export * from './PaginatedResponseFolderResponse';
|
|
41
44
|
export * from './PaginatedResponseInviteResponse';
|
|
42
45
|
export * from './PaginatedResponsePathPartResponse';
|
|
46
|
+
export * from './PaginatedResponsePermissionResponse';
|
|
43
47
|
export * from './PaginatedResponseTagResponse';
|
|
44
48
|
export * from './PaginatedResponseTenantResponse';
|
|
45
49
|
export * from './PaginatedResponseTenantUserInTenantResponse';
|
|
@@ -50,9 +54,12 @@ export * from './PasswordResetRequest';
|
|
|
50
54
|
export * from './PasswordResetWithTokenRequest';
|
|
51
55
|
export * from './PathOrder';
|
|
52
56
|
export * from './PathPartResponse';
|
|
57
|
+
export * from './PermissionCapability';
|
|
58
|
+
export * from './PermissionResponse';
|
|
53
59
|
export * from './Polygon';
|
|
54
60
|
export * from './PolygonReference';
|
|
55
61
|
export * from './RootResponse';
|
|
62
|
+
export * from './ScoredChunkResponse';
|
|
56
63
|
export * from './SectionResponse';
|
|
57
64
|
export * from './SignInRequest';
|
|
58
65
|
export * from './TagPathPartRequest';
|
|
@@ -66,6 +73,7 @@ export * from './UpdateChunkContentRequest';
|
|
|
66
73
|
export * from './UpdateChunkMetadataRequest';
|
|
67
74
|
export * from './UpdateDocumentRequest';
|
|
68
75
|
export * from './UpdateFolderRequest';
|
|
76
|
+
export * from './UpdatePermissionRequest';
|
|
69
77
|
export * from './UpdateSectionRequest';
|
|
70
78
|
export * from './UpdateTagRequest';
|
|
71
79
|
export * from './UpdateTenantRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -20,12 +20,14 @@ __exportStar(require("./ChunkLineageResponse"), exports);
|
|
|
20
20
|
__exportStar(require("./ChunkMetadataInput"), exports);
|
|
21
21
|
__exportStar(require("./ChunkMetadataOutput"), exports);
|
|
22
22
|
__exportStar(require("./ChunkResponse"), exports);
|
|
23
|
+
__exportStar(require("./ChunkSearchRequest"), exports);
|
|
23
24
|
__exportStar(require("./ChunkType"), exports);
|
|
24
25
|
__exportStar(require("./CreateChunkLineageRequest"), exports);
|
|
25
26
|
__exportStar(require("./CreateChunkRequest"), exports);
|
|
26
27
|
__exportStar(require("./CreateDocumentRequest"), exports);
|
|
27
28
|
__exportStar(require("./CreateFolderRequest"), exports);
|
|
28
29
|
__exportStar(require("./CreatePasswordUserRequest"), exports);
|
|
30
|
+
__exportStar(require("./CreatePermissionRequest"), exports);
|
|
29
31
|
__exportStar(require("./CreateSectionRequest"), exports);
|
|
30
32
|
__exportStar(require("./CreateTagRequest"), exports);
|
|
31
33
|
__exportStar(require("./CreateTenantRequest"), exports);
|
|
@@ -38,6 +40,7 @@ __exportStar(require("./DocumentType"), exports);
|
|
|
38
40
|
__exportStar(require("./DocumentVersionResponse"), exports);
|
|
39
41
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
40
42
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
43
|
+
__exportStar(require("./EmbeddingModel"), exports);
|
|
41
44
|
__exportStar(require("./FolderDocumentResponse"), exports);
|
|
42
45
|
__exportStar(require("./FolderResponse"), exports);
|
|
43
46
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
@@ -58,6 +61,7 @@ __exportStar(require("./PaginatedResponseFolderDocumentResponse"), exports);
|
|
|
58
61
|
__exportStar(require("./PaginatedResponseFolderResponse"), exports);
|
|
59
62
|
__exportStar(require("./PaginatedResponseInviteResponse"), exports);
|
|
60
63
|
__exportStar(require("./PaginatedResponsePathPartResponse"), exports);
|
|
64
|
+
__exportStar(require("./PaginatedResponsePermissionResponse"), exports);
|
|
61
65
|
__exportStar(require("./PaginatedResponseTagResponse"), exports);
|
|
62
66
|
__exportStar(require("./PaginatedResponseTenantResponse"), exports);
|
|
63
67
|
__exportStar(require("./PaginatedResponseTenantUserInTenantResponse"), exports);
|
|
@@ -68,9 +72,12 @@ __exportStar(require("./PasswordResetRequest"), exports);
|
|
|
68
72
|
__exportStar(require("./PasswordResetWithTokenRequest"), exports);
|
|
69
73
|
__exportStar(require("./PathOrder"), exports);
|
|
70
74
|
__exportStar(require("./PathPartResponse"), exports);
|
|
75
|
+
__exportStar(require("./PermissionCapability"), exports);
|
|
76
|
+
__exportStar(require("./PermissionResponse"), exports);
|
|
71
77
|
__exportStar(require("./Polygon"), exports);
|
|
72
78
|
__exportStar(require("./PolygonReference"), exports);
|
|
73
79
|
__exportStar(require("./RootResponse"), exports);
|
|
80
|
+
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
74
81
|
__exportStar(require("./SectionResponse"), exports);
|
|
75
82
|
__exportStar(require("./SignInRequest"), exports);
|
|
76
83
|
__exportStar(require("./TagPathPartRequest"), exports);
|
|
@@ -84,6 +91,7 @@ __exportStar(require("./UpdateChunkContentRequest"), exports);
|
|
|
84
91
|
__exportStar(require("./UpdateChunkMetadataRequest"), exports);
|
|
85
92
|
__exportStar(require("./UpdateDocumentRequest"), exports);
|
|
86
93
|
__exportStar(require("./UpdateFolderRequest"), exports);
|
|
94
|
+
__exportStar(require("./UpdatePermissionRequest"), exports);
|
|
87
95
|
__exportStar(require("./UpdateSectionRequest"), exports);
|
|
88
96
|
__exportStar(require("./UpdateTagRequest"), exports);
|
|
89
97
|
__exportStar(require("./UpdateTenantRequest"), exports);
|
package/package.json
CHANGED
package/src/apis/ChunksApi.ts
CHANGED
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ChunkResponse,
|
|
19
|
+
ChunkSearchRequest,
|
|
19
20
|
CreateChunkRequest,
|
|
20
21
|
HTTPValidationError,
|
|
22
|
+
ScoredChunkResponse,
|
|
21
23
|
UpdateChunkContentRequest,
|
|
22
24
|
UpdateChunkMetadataRequest,
|
|
23
25
|
} from '../models/index';
|
|
24
26
|
import {
|
|
25
27
|
ChunkResponseFromJSON,
|
|
26
28
|
ChunkResponseToJSON,
|
|
29
|
+
ChunkSearchRequestFromJSON,
|
|
30
|
+
ChunkSearchRequestToJSON,
|
|
27
31
|
CreateChunkRequestFromJSON,
|
|
28
32
|
CreateChunkRequestToJSON,
|
|
29
33
|
HTTPValidationErrorFromJSON,
|
|
30
34
|
HTTPValidationErrorToJSON,
|
|
35
|
+
ScoredChunkResponseFromJSON,
|
|
36
|
+
ScoredChunkResponseToJSON,
|
|
31
37
|
UpdateChunkContentRequestFromJSON,
|
|
32
38
|
UpdateChunkContentRequestToJSON,
|
|
33
39
|
UpdateChunkMetadataRequestFromJSON,
|
|
@@ -49,6 +55,11 @@ export interface GetChunkRequest {
|
|
|
49
55
|
ksUat?: string;
|
|
50
56
|
}
|
|
51
57
|
|
|
58
|
+
export interface SearchChunksRequest {
|
|
59
|
+
chunkSearchRequest: ChunkSearchRequest;
|
|
60
|
+
ksUat?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
export interface UpdateChunkContentOperationRequest {
|
|
53
64
|
chunkId: string;
|
|
54
65
|
updateChunkContentRequest: UpdateChunkContentRequest;
|
|
@@ -119,6 +130,23 @@ export interface ChunksApiInterface {
|
|
|
119
130
|
*/
|
|
120
131
|
getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
121
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
|
|
135
|
+
* @summary Search Chunks Handler
|
|
136
|
+
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
137
|
+
* @param {string} [ksUat]
|
|
138
|
+
* @param {*} [options] Override http request option.
|
|
139
|
+
* @throws {RequiredError}
|
|
140
|
+
* @memberof ChunksApiInterface
|
|
141
|
+
*/
|
|
142
|
+
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
|
|
146
|
+
* Search Chunks Handler
|
|
147
|
+
*/
|
|
148
|
+
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
149
|
+
|
|
122
150
|
/**
|
|
123
151
|
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
124
152
|
* @summary Update Chunk Content Handler
|
|
@@ -280,6 +308,47 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
280
308
|
return await response.value();
|
|
281
309
|
}
|
|
282
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
|
|
313
|
+
* Search Chunks Handler
|
|
314
|
+
*/
|
|
315
|
+
async searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>> {
|
|
316
|
+
if (requestParameters['chunkSearchRequest'] == null) {
|
|
317
|
+
throw new runtime.RequiredError(
|
|
318
|
+
'chunkSearchRequest',
|
|
319
|
+
'Required parameter "chunkSearchRequest" was null or undefined when calling searchChunks().'
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const queryParameters: any = {};
|
|
324
|
+
|
|
325
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
326
|
+
|
|
327
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
let urlPath = `/v1/chunks/search`;
|
|
331
|
+
|
|
332
|
+
const response = await this.request({
|
|
333
|
+
path: urlPath,
|
|
334
|
+
method: 'POST',
|
|
335
|
+
headers: headerParameters,
|
|
336
|
+
query: queryParameters,
|
|
337
|
+
body: ChunkSearchRequestToJSON(requestParameters['chunkSearchRequest']),
|
|
338
|
+
}, initOverrides);
|
|
339
|
+
|
|
340
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ScoredChunkResponseFromJSON));
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Semantic search over chunks using vector similarity. Combines pgvector cosine similarity with path-based authorization and optional metadata filters. Uses a two-session design to avoid holding a DB connection during the external embedding API call.
|
|
345
|
+
* Search Chunks Handler
|
|
346
|
+
*/
|
|
347
|
+
async searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>> {
|
|
348
|
+
const response = await this.searchChunksRaw(requestParameters, initOverrides);
|
|
349
|
+
return await response.value();
|
|
350
|
+
}
|
|
351
|
+
|
|
283
352
|
/**
|
|
284
353
|
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
285
354
|
* Update Chunk Content Handler
|
|
@@ -355,7 +424,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
355
424
|
headerParameters['Content-Type'] = 'application/json';
|
|
356
425
|
|
|
357
426
|
|
|
358
|
-
let urlPath = `/v1/chunks/{chunk_id}
|
|
427
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
359
428
|
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
360
429
|
|
|
361
430
|
const response = await this.request({
|
package/src/apis/TagsApi.ts
CHANGED
|
@@ -84,7 +84,7 @@ export interface UpdateTagOperationRequest {
|
|
|
84
84
|
*/
|
|
85
85
|
export interface TagsApiInterface {
|
|
86
86
|
/**
|
|
87
|
-
* Attach a tag to a path part.
|
|
87
|
+
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
88
88
|
* @summary Attach Tag Handler
|
|
89
89
|
* @param {string} tagId
|
|
90
90
|
* @param {TagPathPartRequest} tagPathPartRequest
|
|
@@ -96,13 +96,13 @@ export interface TagsApiInterface {
|
|
|
96
96
|
attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Attach a tag to a path part.
|
|
99
|
+
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
100
100
|
* Attach Tag Handler
|
|
101
101
|
*/
|
|
102
102
|
attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
* Create a new tag for the current tenant.
|
|
105
|
+
* Create a new tag for the current tenant. Requires ADMIN or OWNER role.
|
|
106
106
|
* @summary Create Tag Handler
|
|
107
107
|
* @param {CreateTagRequest} createTagRequest
|
|
108
108
|
* @param {string} [ksUat]
|
|
@@ -113,13 +113,13 @@ export interface TagsApiInterface {
|
|
|
113
113
|
createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* Create a new tag for the current tenant.
|
|
116
|
+
* Create a new tag for the current tenant. Requires ADMIN or OWNER role.
|
|
117
117
|
* Create Tag Handler
|
|
118
118
|
*/
|
|
119
119
|
createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* Delete a tag and all its path_part associations.
|
|
122
|
+
* Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
|
|
123
123
|
* @summary Delete Tag Handler
|
|
124
124
|
* @param {string} tagId
|
|
125
125
|
* @param {string} [ksUat]
|
|
@@ -130,13 +130,13 @@ export interface TagsApiInterface {
|
|
|
130
130
|
deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* Delete a tag and all its path_part associations.
|
|
133
|
+
* Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
|
|
134
134
|
* Delete Tag Handler
|
|
135
135
|
*/
|
|
136
136
|
deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* Detach a tag from a path part.
|
|
139
|
+
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
140
140
|
* @summary Detach Tag Handler
|
|
141
141
|
* @param {string} tagId
|
|
142
142
|
* @param {string} pathPartId
|
|
@@ -148,7 +148,7 @@ export interface TagsApiInterface {
|
|
|
148
148
|
detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
* Detach a tag from a path part.
|
|
151
|
+
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
152
152
|
* Detach Tag Handler
|
|
153
153
|
*/
|
|
154
154
|
detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -189,7 +189,7 @@ export interface TagsApiInterface {
|
|
|
189
189
|
listTags(requestParameters: ListTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseTagResponse>;
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* Update a tag (name, color, and/or description).
|
|
192
|
+
* Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
|
|
193
193
|
* @summary Update Tag Handler
|
|
194
194
|
* @param {string} tagId
|
|
195
195
|
* @param {UpdateTagRequest} updateTagRequest
|
|
@@ -201,7 +201,7 @@ export interface TagsApiInterface {
|
|
|
201
201
|
updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>>;
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
|
-
* Update a tag (name, color, and/or description).
|
|
204
|
+
* Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
|
|
205
205
|
* Update Tag Handler
|
|
206
206
|
*/
|
|
207
207
|
updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse>;
|
|
@@ -214,7 +214,7 @@ export interface TagsApiInterface {
|
|
|
214
214
|
export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
|
-
* Attach a tag to a path part.
|
|
217
|
+
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
218
218
|
* Attach Tag Handler
|
|
219
219
|
*/
|
|
220
220
|
async attachTagToPathPartRaw(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>> {
|
|
@@ -254,7 +254,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
* Attach a tag to a path part.
|
|
257
|
+
* Attach a tag to a path part. Requires ADMIN or OWNER role.
|
|
258
258
|
* Attach Tag Handler
|
|
259
259
|
*/
|
|
260
260
|
async attachTagToPathPart(requestParameters: AttachTagToPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse> {
|
|
@@ -263,7 +263,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
|
-
* Create a new tag for the current tenant.
|
|
266
|
+
* Create a new tag for the current tenant. Requires ADMIN or OWNER role.
|
|
267
267
|
* Create Tag Handler
|
|
268
268
|
*/
|
|
269
269
|
async createTagRaw(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>> {
|
|
@@ -295,7 +295,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
|
-
* Create a new tag for the current tenant.
|
|
298
|
+
* Create a new tag for the current tenant. Requires ADMIN or OWNER role.
|
|
299
299
|
* Create Tag Handler
|
|
300
300
|
*/
|
|
301
301
|
async createTag(requestParameters: CreateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse> {
|
|
@@ -304,7 +304,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
|
-
* Delete a tag and all its path_part associations.
|
|
307
|
+
* Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
|
|
308
308
|
* Delete Tag Handler
|
|
309
309
|
*/
|
|
310
310
|
async deleteTagRaw(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -334,7 +334,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
* Delete a tag and all its path_part associations.
|
|
337
|
+
* Delete a tag and all its path_part associations. Requires ADMIN or OWNER role.
|
|
338
338
|
* Delete Tag Handler
|
|
339
339
|
*/
|
|
340
340
|
async deleteTag(requestParameters: DeleteTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -342,7 +342,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
|
-
* Detach a tag from a path part.
|
|
345
|
+
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
346
346
|
* Detach Tag Handler
|
|
347
347
|
*/
|
|
348
348
|
async detachTagFromPathPartRaw(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -380,7 +380,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
|
-
* Detach a tag from a path part.
|
|
383
|
+
* Detach a tag from a path part. Requires ADMIN or OWNER role.
|
|
384
384
|
* Detach Tag Handler
|
|
385
385
|
*/
|
|
386
386
|
async detachTagFromPathPart(requestParameters: DetachTagFromPathPartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -466,7 +466,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
/**
|
|
469
|
-
* Update a tag (name, color, and/or description).
|
|
469
|
+
* Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
|
|
470
470
|
* Update Tag Handler
|
|
471
471
|
*/
|
|
472
472
|
async updateTagRaw(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TagResponse>> {
|
|
@@ -506,7 +506,7 @@ export class TagsApi extends runtime.BaseAPI implements TagsApiInterface {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
|
-
* Update a tag (name, color, and/or description).
|
|
509
|
+
* Update a tag (name, color, and/or description). Requires ADMIN or OWNER role.
|
|
510
510
|
* Update Tag Handler
|
|
511
511
|
*/
|
|
512
512
|
async updateTag(requestParameters: UpdateTagOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TagResponse> {
|
package/src/apis/ThreadsApi.ts
CHANGED
|
@@ -87,7 +87,7 @@ export interface ThreadsApiInterface {
|
|
|
87
87
|
createThread(requestParameters: CreateThreadOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ThreadResponse>;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
|
|
90
|
+
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
|
|
91
91
|
* @summary Delete Thread Handler
|
|
92
92
|
* @param {string} threadId
|
|
93
93
|
* @param {string} [ksUat]
|
|
@@ -98,7 +98,7 @@ export interface ThreadsApiInterface {
|
|
|
98
98
|
deleteThreadRaw(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
|
|
101
|
+
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
|
|
102
102
|
* Delete Thread Handler
|
|
103
103
|
*/
|
|
104
104
|
deleteThread(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -206,7 +206,7 @@ export class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInterface {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
|
|
209
|
+
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
|
|
210
210
|
* Delete Thread Handler
|
|
211
211
|
*/
|
|
212
212
|
async deleteThreadRaw(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -236,7 +236,7 @@ export class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInterface {
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
|
-
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted.
|
|
239
|
+
* Delete a thread. Authorization: only conversation threads belonging to the current user (under /users/{user_id}/threads/) can be deleted. Asset threads (attached to documents/sections) are never deletable via this endpoint.
|
|
240
240
|
* Delete Thread Handler
|
|
241
241
|
*/
|
|
242
242
|
async deleteThread(requestParameters: DeleteThreadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|