@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.
Files changed (123) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunksApi.d.ts +30 -1
  4. package/dist/apis/ChunksApi.js +34 -1
  5. package/dist/apis/TagsApi.d.ts +20 -20
  6. package/dist/apis/TagsApi.js +10 -10
  7. package/dist/apis/ThreadsApi.d.ts +4 -4
  8. package/dist/apis/ThreadsApi.js +2 -2
  9. package/dist/apis/UserPermissionsApi.d.ts +154 -0
  10. package/dist/apis/UserPermissionsApi.js +192 -0
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/ChunksApi.d.ts +30 -1
  14. package/dist/esm/apis/ChunksApi.js +35 -2
  15. package/dist/esm/apis/TagsApi.d.ts +20 -20
  16. package/dist/esm/apis/TagsApi.js +10 -10
  17. package/dist/esm/apis/ThreadsApi.d.ts +4 -4
  18. package/dist/esm/apis/ThreadsApi.js +2 -2
  19. package/dist/esm/apis/UserPermissionsApi.d.ts +154 -0
  20. package/dist/esm/apis/UserPermissionsApi.js +188 -0
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  24. package/dist/esm/models/ChunkResponse.js +4 -0
  25. package/dist/esm/models/ChunkSearchRequest.d.ts +89 -0
  26. package/dist/esm/models/ChunkSearchRequest.js +69 -0
  27. package/dist/esm/models/CreatePermissionRequest.d.ts +66 -0
  28. package/dist/esm/models/CreatePermissionRequest.js +57 -0
  29. package/dist/esm/models/DocumentContentPathPart.d.ts +6 -0
  30. package/dist/esm/models/DocumentContentPathPart.js +4 -0
  31. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  32. package/dist/esm/models/DocumentResponse.js +4 -0
  33. package/dist/esm/models/DocumentVersionResponse.d.ts +6 -0
  34. package/dist/esm/models/DocumentVersionResponse.js +4 -0
  35. package/dist/esm/models/EmbeddingModel.d.ts +24 -0
  36. package/dist/esm/models/EmbeddingModel.js +42 -0
  37. package/dist/esm/models/FolderDocumentResponse.d.ts +6 -0
  38. package/dist/esm/models/FolderDocumentResponse.js +4 -0
  39. package/dist/esm/models/FolderResponse.d.ts +6 -0
  40. package/dist/esm/models/FolderResponse.js +4 -0
  41. package/dist/esm/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  42. package/dist/esm/models/PaginatedResponsePermissionResponse.js +70 -0
  43. package/dist/esm/models/PathPartResponse.d.ts +6 -0
  44. package/dist/esm/models/PathPartResponse.js +4 -0
  45. package/dist/esm/models/PermissionCapability.d.ts +25 -0
  46. package/dist/esm/models/PermissionCapability.js +43 -0
  47. package/dist/esm/models/PermissionResponse.d.ts +84 -0
  48. package/dist/esm/models/PermissionResponse.js +69 -0
  49. package/dist/esm/models/ScoredChunkResponse.d.ts +127 -0
  50. package/dist/esm/models/ScoredChunkResponse.js +94 -0
  51. package/dist/esm/models/SectionResponse.d.ts +6 -0
  52. package/dist/esm/models/SectionResponse.js +4 -0
  53. package/dist/esm/models/ThreadMessageResponse.d.ts +6 -0
  54. package/dist/esm/models/ThreadMessageResponse.js +4 -0
  55. package/dist/esm/models/ThreadResponse.d.ts +6 -0
  56. package/dist/esm/models/ThreadResponse.js +4 -0
  57. package/dist/esm/models/UpdatePermissionRequest.d.ts +54 -0
  58. package/dist/esm/models/UpdatePermissionRequest.js +45 -0
  59. package/dist/esm/models/index.d.ts +8 -0
  60. package/dist/esm/models/index.js +8 -0
  61. package/dist/models/ChunkResponse.d.ts +6 -0
  62. package/dist/models/ChunkResponse.js +4 -0
  63. package/dist/models/ChunkSearchRequest.d.ts +89 -0
  64. package/dist/models/ChunkSearchRequest.js +77 -0
  65. package/dist/models/CreatePermissionRequest.d.ts +66 -0
  66. package/dist/models/CreatePermissionRequest.js +65 -0
  67. package/dist/models/DocumentContentPathPart.d.ts +6 -0
  68. package/dist/models/DocumentContentPathPart.js +4 -0
  69. package/dist/models/DocumentResponse.d.ts +6 -0
  70. package/dist/models/DocumentResponse.js +4 -0
  71. package/dist/models/DocumentVersionResponse.d.ts +6 -0
  72. package/dist/models/DocumentVersionResponse.js +4 -0
  73. package/dist/models/EmbeddingModel.d.ts +24 -0
  74. package/dist/models/EmbeddingModel.js +50 -0
  75. package/dist/models/FolderDocumentResponse.d.ts +6 -0
  76. package/dist/models/FolderDocumentResponse.js +4 -0
  77. package/dist/models/FolderResponse.d.ts +6 -0
  78. package/dist/models/FolderResponse.js +4 -0
  79. package/dist/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  80. package/dist/models/PaginatedResponsePermissionResponse.js +78 -0
  81. package/dist/models/PathPartResponse.d.ts +6 -0
  82. package/dist/models/PathPartResponse.js +4 -0
  83. package/dist/models/PermissionCapability.d.ts +25 -0
  84. package/dist/models/PermissionCapability.js +51 -0
  85. package/dist/models/PermissionResponse.d.ts +84 -0
  86. package/dist/models/PermissionResponse.js +77 -0
  87. package/dist/models/ScoredChunkResponse.d.ts +127 -0
  88. package/dist/models/ScoredChunkResponse.js +102 -0
  89. package/dist/models/SectionResponse.d.ts +6 -0
  90. package/dist/models/SectionResponse.js +4 -0
  91. package/dist/models/ThreadMessageResponse.d.ts +6 -0
  92. package/dist/models/ThreadMessageResponse.js +4 -0
  93. package/dist/models/ThreadResponse.d.ts +6 -0
  94. package/dist/models/ThreadResponse.js +4 -0
  95. package/dist/models/UpdatePermissionRequest.d.ts +54 -0
  96. package/dist/models/UpdatePermissionRequest.js +53 -0
  97. package/dist/models/index.d.ts +8 -0
  98. package/dist/models/index.js +8 -0
  99. package/package.json +1 -1
  100. package/src/apis/ChunksApi.ts +70 -1
  101. package/src/apis/TagsApi.ts +20 -20
  102. package/src/apis/ThreadsApi.ts +4 -4
  103. package/src/apis/UserPermissionsApi.ts +362 -0
  104. package/src/apis/index.ts +1 -0
  105. package/src/models/ChunkResponse.ts +9 -0
  106. package/src/models/ChunkSearchRequest.ts +160 -0
  107. package/src/models/CreatePermissionRequest.ts +120 -0
  108. package/src/models/DocumentContentPathPart.ts +9 -0
  109. package/src/models/DocumentResponse.ts +9 -0
  110. package/src/models/DocumentVersionResponse.ts +9 -0
  111. package/src/models/EmbeddingModel.ts +52 -0
  112. package/src/models/FolderDocumentResponse.ts +9 -0
  113. package/src/models/FolderResponse.ts +9 -0
  114. package/src/models/PaginatedResponsePermissionResponse.ts +130 -0
  115. package/src/models/PathPartResponse.ts +9 -0
  116. package/src/models/PermissionCapability.ts +53 -0
  117. package/src/models/PermissionResponse.ts +147 -0
  118. package/src/models/ScoredChunkResponse.ts +215 -0
  119. package/src/models/SectionResponse.ts +9 -0
  120. package/src/models/ThreadMessageResponse.ts +9 -0
  121. package/src/models/ThreadResponse.ts +9 -0
  122. package/src/models/UpdatePermissionRequest.ts +100 -0
  123. package/src/models/index.ts +8 -0
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
+ import type { ChunkType } from './ChunkType';
14
+ /**
15
+ * Chunk response with similarity score.
16
+ * @export
17
+ * @interface ScoredChunkResponse
18
+ */
19
+ export interface ScoredChunkResponse {
20
+ /**
21
+ * Chunk ID
22
+ * @type {string}
23
+ * @memberof ScoredChunkResponse
24
+ */
25
+ id: string;
26
+ /**
27
+ * PathPart ID
28
+ * @type {string}
29
+ * @memberof ScoredChunkResponse
30
+ */
31
+ pathPartId: string;
32
+ /**
33
+ * ChunkContent ID
34
+ * @type {string}
35
+ * @memberof ScoredChunkResponse
36
+ */
37
+ contentId: string;
38
+ /**
39
+ * Chunk text content
40
+ * @type {string}
41
+ * @memberof ScoredChunkResponse
42
+ */
43
+ content: string;
44
+ /**
45
+ * Type of chunk content
46
+ * @type {ChunkType}
47
+ * @memberof ScoredChunkResponse
48
+ */
49
+ chunkType: ChunkType;
50
+ /**
51
+ * Chunk metadata
52
+ * @type {ChunkMetadataOutput}
53
+ * @memberof ScoredChunkResponse
54
+ */
55
+ chunkMetadata: ChunkMetadataOutput;
56
+ /**
57
+ * Parent PathPart ID
58
+ * @type {string}
59
+ * @memberof ScoredChunkResponse
60
+ */
61
+ parentId: string;
62
+ /**
63
+ * Previous sibling PathPart ID
64
+ * @type {string}
65
+ * @memberof ScoredChunkResponse
66
+ */
67
+ prevSiblingPathId?: string;
68
+ /**
69
+ * Next sibling PathPart ID
70
+ * @type {string}
71
+ * @memberof ScoredChunkResponse
72
+ */
73
+ nextSiblingId?: string;
74
+ /**
75
+ * Full materialized path from root
76
+ * @type {string}
77
+ * @memberof ScoredChunkResponse
78
+ */
79
+ materializedPath: string;
80
+ /**
81
+ * Tenant ID
82
+ * @type {string}
83
+ * @memberof ScoredChunkResponse
84
+ */
85
+ tenantId: string;
86
+ /**
87
+ * Creation timestamp
88
+ * @type {Date}
89
+ * @memberof ScoredChunkResponse
90
+ */
91
+ createdAt: Date;
92
+ /**
93
+ * Last update timestamp
94
+ * @type {Date}
95
+ * @memberof ScoredChunkResponse
96
+ */
97
+ updatedAt: Date;
98
+ /**
99
+ * Cosine similarity score (1 - cosine_distance)
100
+ * @type {number}
101
+ * @memberof ScoredChunkResponse
102
+ */
103
+ score: number;
104
+ }
105
+ /**
106
+ * Check if a given object implements the ScoredChunkResponse interface.
107
+ */
108
+ export declare function instanceOfScoredChunkResponse(value: object): value is ScoredChunkResponse;
109
+ export declare function ScoredChunkResponseFromJSON(json: any): ScoredChunkResponse;
110
+ export declare function ScoredChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScoredChunkResponse;
111
+ export declare function ScoredChunkResponseToJSON(json: any): ScoredChunkResponse;
112
+ export declare function ScoredChunkResponseToJSONTyped(value?: ScoredChunkResponse | null, ignoreDiscriminator?: boolean): any;
113
+ export declare const ScoredChunkResponsePropertyValidationAttributesMap: {
114
+ [property: string]: {
115
+ maxLength?: number;
116
+ minLength?: number;
117
+ pattern?: string;
118
+ maximum?: number;
119
+ exclusiveMaximum?: boolean;
120
+ minimum?: number;
121
+ exclusiveMinimum?: boolean;
122
+ multipleOf?: number;
123
+ maxItems?: number;
124
+ minItems?: number;
125
+ uniqueItems?: boolean;
126
+ };
127
+ };
@@ -0,0 +1,94 @@
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
+ import { ChunkMetadataOutputFromJSON, ChunkMetadataOutputToJSON, } from './ChunkMetadataOutput';
15
+ import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
16
+ /**
17
+ * Check if a given object implements the ScoredChunkResponse interface.
18
+ */
19
+ export function instanceOfScoredChunkResponse(value) {
20
+ if (!('id' in value) || value['id'] === undefined)
21
+ return false;
22
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
23
+ return false;
24
+ if (!('contentId' in value) || value['contentId'] === undefined)
25
+ return false;
26
+ if (!('content' in value) || value['content'] === undefined)
27
+ return false;
28
+ if (!('chunkType' in value) || value['chunkType'] === undefined)
29
+ return false;
30
+ if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
31
+ return false;
32
+ if (!('parentId' in value) || value['parentId'] === undefined)
33
+ return false;
34
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
35
+ return false;
36
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
37
+ return false;
38
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
39
+ return false;
40
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
41
+ return false;
42
+ if (!('score' in value) || value['score'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ export function ScoredChunkResponseFromJSON(json) {
47
+ return ScoredChunkResponseFromJSONTyped(json, false);
48
+ }
49
+ export function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'id': json['id'],
55
+ 'pathPartId': json['path_part_id'],
56
+ 'contentId': json['content_id'],
57
+ 'content': json['content'],
58
+ 'chunkType': ChunkTypeFromJSON(json['chunk_type']),
59
+ 'chunkMetadata': ChunkMetadataOutputFromJSON(json['chunk_metadata']),
60
+ 'parentId': json['parent_id'],
61
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
62
+ 'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
63
+ 'materializedPath': json['materialized_path'],
64
+ 'tenantId': json['tenant_id'],
65
+ 'createdAt': (new Date(json['created_at'])),
66
+ 'updatedAt': (new Date(json['updated_at'])),
67
+ 'score': json['score'],
68
+ };
69
+ }
70
+ export function ScoredChunkResponseToJSON(json) {
71
+ return ScoredChunkResponseToJSONTyped(json, false);
72
+ }
73
+ export function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+ return {
78
+ 'id': value['id'],
79
+ 'path_part_id': value['pathPartId'],
80
+ 'content_id': value['contentId'],
81
+ 'content': value['content'],
82
+ 'chunk_type': ChunkTypeToJSON(value['chunkType']),
83
+ 'chunk_metadata': ChunkMetadataOutputToJSON(value['chunkMetadata']),
84
+ 'parent_id': value['parentId'],
85
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
86
+ 'next_sibling_id': value['nextSiblingId'],
87
+ 'materialized_path': value['materializedPath'],
88
+ 'tenant_id': value['tenantId'],
89
+ 'created_at': value['createdAt'].toISOString(),
90
+ 'updated_at': value['updatedAt'].toISOString(),
91
+ 'score': value['score'],
92
+ };
93
+ }
94
+ export const ScoredChunkResponsePropertyValidationAttributesMap = {};
@@ -57,6 +57,12 @@ export interface SectionResponse {
57
57
  * @memberof SectionResponse
58
58
  */
59
59
  nextSiblingId?: string;
60
+ /**
61
+ * Full materialized path from root
62
+ * @type {string}
63
+ * @memberof SectionResponse
64
+ */
65
+ materializedPath: string;
60
66
  /**
61
67
  * Tenant ID
62
68
  * @type {string}
@@ -23,6 +23,8 @@ export function instanceOfSectionResponse(value) {
23
23
  return false;
24
24
  if (!('parentId' in value) || value['parentId'] === undefined)
25
25
  return false;
26
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
27
+ return false;
26
28
  if (!('tenantId' in value) || value['tenantId'] === undefined)
27
29
  return false;
28
30
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -46,6 +48,7 @@ export function SectionResponseFromJSONTyped(json, ignoreDiscriminator) {
46
48
  'parentId': json['parent_id'],
47
49
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
48
50
  'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
51
+ 'materializedPath': json['materialized_path'],
49
52
  'tenantId': json['tenant_id'],
50
53
  'createdAt': (new Date(json['created_at'])),
51
54
  'updatedAt': (new Date(json['updated_at'])),
@@ -66,6 +69,7 @@ export function SectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
66
69
  'parent_id': value['parentId'],
67
70
  'prev_sibling_path_id': value['prevSiblingPathId'],
68
71
  'next_sibling_id': value['nextSiblingId'],
72
+ 'materialized_path': value['materializedPath'],
69
73
  'tenant_id': value['tenantId'],
70
74
  'created_at': value['createdAt'].toISOString(),
71
75
  'updated_at': value['updatedAt'].toISOString(),
@@ -52,6 +52,12 @@ export interface ThreadMessageResponse {
52
52
  * @memberof ThreadMessageResponse
53
53
  */
54
54
  parentId: string;
55
+ /**
56
+ * Full materialized path from root
57
+ * @type {string}
58
+ * @memberof ThreadMessageResponse
59
+ */
60
+ materializedPath: string;
55
61
  /**
56
62
  * Tenant ID
57
63
  * @type {string}
@@ -28,6 +28,8 @@ export function instanceOfThreadMessageResponse(value) {
28
28
  return false;
29
29
  if (!('parentId' in value) || value['parentId'] === undefined)
30
30
  return false;
31
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
32
+ return false;
31
33
  if (!('tenantId' in value) || value['tenantId'] === undefined)
32
34
  return false;
33
35
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -50,6 +52,7 @@ export function ThreadMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
50
52
  'role': MessageRoleFromJSON(json['role']),
51
53
  'content': json['content'],
52
54
  'parentId': json['parent_id'],
55
+ 'materializedPath': json['materialized_path'],
53
56
  'tenantId': json['tenant_id'],
54
57
  'createdAt': (new Date(json['created_at'])),
55
58
  'updatedAt': (new Date(json['updated_at'])),
@@ -69,6 +72,7 @@ export function ThreadMessageResponseToJSONTyped(value, ignoreDiscriminator = fa
69
72
  'role': MessageRoleToJSON(value['role']),
70
73
  'content': value['content'],
71
74
  'parent_id': value['parentId'],
75
+ 'materialized_path': value['materializedPath'],
72
76
  'tenant_id': value['tenantId'],
73
77
  'created_at': value['createdAt'].toISOString(),
74
78
  'updated_at': value['updatedAt'].toISOString(),
@@ -39,6 +39,12 @@ export interface ThreadResponse {
39
39
  * @memberof ThreadResponse
40
40
  */
41
41
  parentThreadId?: string;
42
+ /**
43
+ * Full materialized path from root
44
+ * @type {string}
45
+ * @memberof ThreadResponse
46
+ */
47
+ materializedPath: string;
42
48
  /**
43
49
  * Tenant ID
44
50
  * @type {string}
@@ -21,6 +21,8 @@ export function instanceOfThreadResponse(value) {
21
21
  return false;
22
22
  if (!('title' in value) || value['title'] === undefined)
23
23
  return false;
24
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
25
+ return false;
24
26
  if (!('tenantId' in value) || value['tenantId'] === undefined)
25
27
  return false;
26
28
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -41,6 +43,7 @@ export function ThreadResponseFromJSONTyped(json, ignoreDiscriminator) {
41
43
  'pathPartId': json['path_part_id'],
42
44
  'title': json['title'],
43
45
  'parentThreadId': json['parent_thread_id'] == null ? undefined : json['parent_thread_id'],
46
+ 'materializedPath': json['materialized_path'],
44
47
  'tenantId': json['tenant_id'],
45
48
  'createdAt': (new Date(json['created_at'])),
46
49
  'updatedAt': (new Date(json['updated_at'])),
@@ -58,6 +61,7 @@ export function ThreadResponseToJSONTyped(value, ignoreDiscriminator = false) {
58
61
  'path_part_id': value['pathPartId'],
59
62
  'title': value['title'],
60
63
  'parent_thread_id': value['parentThreadId'],
64
+ 'materialized_path': value['materializedPath'],
61
65
  'tenant_id': value['tenantId'],
62
66
  'created_at': value['createdAt'].toISOString(),
63
67
  'updated_at': value['updatedAt'].toISOString(),
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { PermissionCapability } from './PermissionCapability';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdatePermissionRequest
17
+ */
18
+ export interface UpdatePermissionRequest {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UpdatePermissionRequest
23
+ */
24
+ path?: string;
25
+ /**
26
+ *
27
+ * @type {PermissionCapability}
28
+ * @memberof UpdatePermissionRequest
29
+ */
30
+ capability?: PermissionCapability;
31
+ }
32
+ /**
33
+ * Check if a given object implements the UpdatePermissionRequest interface.
34
+ */
35
+ export declare function instanceOfUpdatePermissionRequest(value: object): value is UpdatePermissionRequest;
36
+ export declare function UpdatePermissionRequestFromJSON(json: any): UpdatePermissionRequest;
37
+ export declare function UpdatePermissionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePermissionRequest;
38
+ export declare function UpdatePermissionRequestToJSON(json: any): UpdatePermissionRequest;
39
+ export declare function UpdatePermissionRequestToJSONTyped(value?: UpdatePermissionRequest | null, ignoreDiscriminator?: boolean): any;
40
+ export declare const UpdatePermissionRequestPropertyValidationAttributesMap: {
41
+ [property: string]: {
42
+ maxLength?: number;
43
+ minLength?: number;
44
+ pattern?: string;
45
+ maximum?: number;
46
+ exclusiveMaximum?: boolean;
47
+ minimum?: number;
48
+ exclusiveMinimum?: boolean;
49
+ multipleOf?: number;
50
+ maxItems?: number;
51
+ minItems?: number;
52
+ uniqueItems?: boolean;
53
+ };
54
+ };
@@ -0,0 +1,45 @@
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
+ import { PermissionCapabilityFromJSON, PermissionCapabilityToJSON, } from './PermissionCapability';
15
+ /**
16
+ * Check if a given object implements the UpdatePermissionRequest interface.
17
+ */
18
+ export function instanceOfUpdatePermissionRequest(value) {
19
+ return true;
20
+ }
21
+ export function UpdatePermissionRequestFromJSON(json) {
22
+ return UpdatePermissionRequestFromJSONTyped(json, false);
23
+ }
24
+ export function UpdatePermissionRequestFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'path': json['path'] == null ? undefined : json['path'],
30
+ 'capability': json['capability'] == null ? undefined : PermissionCapabilityFromJSON(json['capability']),
31
+ };
32
+ }
33
+ export function UpdatePermissionRequestToJSON(json) {
34
+ return UpdatePermissionRequestToJSONTyped(json, false);
35
+ }
36
+ export function UpdatePermissionRequestToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'path': value['path'],
42
+ 'capability': PermissionCapabilityToJSON(value['capability']),
43
+ };
44
+ }
45
+ export const UpdatePermissionRequestPropertyValidationAttributesMap = {};
@@ -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';
@@ -4,12 +4,14 @@ export * from './ChunkLineageResponse';
4
4
  export * from './ChunkMetadataInput';
5
5
  export * from './ChunkMetadataOutput';
6
6
  export * from './ChunkResponse';
7
+ export * from './ChunkSearchRequest';
7
8
  export * from './ChunkType';
8
9
  export * from './CreateChunkLineageRequest';
9
10
  export * from './CreateChunkRequest';
10
11
  export * from './CreateDocumentRequest';
11
12
  export * from './CreateFolderRequest';
12
13
  export * from './CreatePasswordUserRequest';
14
+ export * from './CreatePermissionRequest';
13
15
  export * from './CreateSectionRequest';
14
16
  export * from './CreateTagRequest';
15
17
  export * from './CreateTenantRequest';
@@ -22,6 +24,7 @@ export * from './DocumentType';
22
24
  export * from './DocumentVersionResponse';
23
25
  export * from './EmailSentResponse';
24
26
  export * from './EmailVerificationRequest';
27
+ export * from './EmbeddingModel';
25
28
  export * from './FolderDocumentResponse';
26
29
  export * from './FolderResponse';
27
30
  export * from './HTTPValidationError';
@@ -42,6 +45,7 @@ export * from './PaginatedResponseFolderDocumentResponse';
42
45
  export * from './PaginatedResponseFolderResponse';
43
46
  export * from './PaginatedResponseInviteResponse';
44
47
  export * from './PaginatedResponsePathPartResponse';
48
+ export * from './PaginatedResponsePermissionResponse';
45
49
  export * from './PaginatedResponseTagResponse';
46
50
  export * from './PaginatedResponseTenantResponse';
47
51
  export * from './PaginatedResponseTenantUserInTenantResponse';
@@ -52,9 +56,12 @@ export * from './PasswordResetRequest';
52
56
  export * from './PasswordResetWithTokenRequest';
53
57
  export * from './PathOrder';
54
58
  export * from './PathPartResponse';
59
+ export * from './PermissionCapability';
60
+ export * from './PermissionResponse';
55
61
  export * from './Polygon';
56
62
  export * from './PolygonReference';
57
63
  export * from './RootResponse';
64
+ export * from './ScoredChunkResponse';
58
65
  export * from './SectionResponse';
59
66
  export * from './SignInRequest';
60
67
  export * from './TagPathPartRequest';
@@ -68,6 +75,7 @@ export * from './UpdateChunkContentRequest';
68
75
  export * from './UpdateChunkMetadataRequest';
69
76
  export * from './UpdateDocumentRequest';
70
77
  export * from './UpdateFolderRequest';
78
+ export * from './UpdatePermissionRequest';
71
79
  export * from './UpdateSectionRequest';
72
80
  export * from './UpdateTagRequest';
73
81
  export * from './UpdateTenantRequest';
@@ -71,6 +71,12 @@ export interface ChunkResponse {
71
71
  * @memberof ChunkResponse
72
72
  */
73
73
  nextSiblingId?: string;
74
+ /**
75
+ * Full materialized path from root
76
+ * @type {string}
77
+ * @memberof ChunkResponse
78
+ */
79
+ materializedPath: string;
74
80
  /**
75
81
  * Tenant ID
76
82
  * @type {string}
@@ -39,6 +39,8 @@ function instanceOfChunkResponse(value) {
39
39
  return false;
40
40
  if (!('parentId' in value) || value['parentId'] === undefined)
41
41
  return false;
42
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
43
+ return false;
42
44
  if (!('tenantId' in value) || value['tenantId'] === undefined)
43
45
  return false;
44
46
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -64,6 +66,7 @@ function ChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
64
66
  'parentId': json['parent_id'],
65
67
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
66
68
  'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
69
+ 'materializedPath': json['materialized_path'],
67
70
  'tenantId': json['tenant_id'],
68
71
  'createdAt': (new Date(json['created_at'])),
69
72
  'updatedAt': (new Date(json['updated_at'])),
@@ -86,6 +89,7 @@ function ChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
86
89
  'parent_id': value['parentId'],
87
90
  'prev_sibling_path_id': value['prevSiblingPathId'],
88
91
  'next_sibling_id': value['nextSiblingId'],
92
+ 'materialized_path': value['materializedPath'],
89
93
  'tenant_id': value['tenantId'],
90
94
  'created_at': value['createdAt'].toISOString(),
91
95
  'updated_at': value['updatedAt'].toISOString(),
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { EmbeddingModel } from './EmbeddingModel';
13
+ import type { ChunkType } from './ChunkType';
14
+ /**
15
+ * Request body for semantic chunk search.
16
+ * @export
17
+ * @interface ChunkSearchRequest
18
+ */
19
+ export interface ChunkSearchRequest {
20
+ /**
21
+ * Search query text
22
+ * @type {string}
23
+ * @memberof ChunkSearchRequest
24
+ */
25
+ query: string;
26
+ /**
27
+ * Embedding model to use
28
+ * @type {EmbeddingModel}
29
+ * @memberof ChunkSearchRequest
30
+ */
31
+ model?: EmbeddingModel;
32
+ /**
33
+ * Path part IDs to search within (non-CHUNK types). Defaults to tenant's /KS_ROOT/shared.
34
+ * @type {Array<string>}
35
+ * @memberof ChunkSearchRequest
36
+ */
37
+ parentPathIds?: Array<string>;
38
+ /**
39
+ * Filter by chunk type (TEXT, TABLE, IMAGE, UNKNOWN)
40
+ * @type {ChunkType}
41
+ * @memberof ChunkSearchRequest
42
+ */
43
+ chunkType?: ChunkType;
44
+ /**
45
+ * Only chunks updated after this timestamp
46
+ * @type {Date}
47
+ * @memberof ChunkSearchRequest
48
+ */
49
+ updatedAt?: Date;
50
+ /**
51
+ * Number of results (1-50)
52
+ * @type {number}
53
+ * @memberof ChunkSearchRequest
54
+ */
55
+ topK?: number;
56
+ /**
57
+ * Minimum similarity score
58
+ * @type {number}
59
+ * @memberof ChunkSearchRequest
60
+ */
61
+ scoreThreshold?: number;
62
+ }
63
+ /**
64
+ * Check if a given object implements the ChunkSearchRequest interface.
65
+ */
66
+ export declare function instanceOfChunkSearchRequest(value: object): value is ChunkSearchRequest;
67
+ export declare function ChunkSearchRequestFromJSON(json: any): ChunkSearchRequest;
68
+ export declare function ChunkSearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkSearchRequest;
69
+ export declare function ChunkSearchRequestToJSON(json: any): ChunkSearchRequest;
70
+ export declare function ChunkSearchRequestToJSONTyped(value?: ChunkSearchRequest | null, ignoreDiscriminator?: boolean): any;
71
+ export declare const ChunkSearchRequestPropertyValidationAttributesMap: {
72
+ [property: string]: {
73
+ maxLength?: number;
74
+ minLength?: number;
75
+ pattern?: string;
76
+ maximum?: number;
77
+ exclusiveMaximum?: boolean;
78
+ minimum?: number;
79
+ exclusiveMinimum?: boolean;
80
+ multipleOf?: number;
81
+ maxItems?: number;
82
+ minItems?: number;
83
+ uniqueItems?: boolean;
84
+ };
85
+ };
86
+ export declare const ChunkSearchRequestAdditionalPropertiesValidationAttributes: {
87
+ maxProperties?: number;
88
+ minProperties?: number;
89
+ };